-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toObjectMethod being called by different argument types #5549
Comments
well i do not know why this should be so broken and things works. |
Definetely a bug.... Do you mind opening a PR with a test that fails and then add the fix and make test passing? |
You should still try to reproduce the bug. I bet that if you add a canvas with a clipPath and then you do toObject, it will fail. won't it? |
http://jsfiddle.net/52sp0hev/ |
@asturur, sure will open a PR |
@asturur should I branch from master? A lot of unit tests are already failing. Is there a recommended node version I should be using with this repo? |
any node between 4 and 6. npm install |
Cool, will sort it out tomorrow. |
this is fixed now |
Version
EDIT:
2.4.02.6.0Details
Firstly, sorry to go off the issue format. I'm working on a biggish project which extends quite a few different classes so it might be a problem of my own making.
The
_toObjectMethod
is called recursively ifclipPath
resolves to true, but instead ofmethodName
being passed which (afaik) should be astring
, and in this instance should have the value"toObject"
. But as you can see below it is called with whatever is assigned toclipPath
, which in my case is a fabric.jsklass
, and this breaks the following call tothis._toObjects
>this._toObject
when trying to locate amethodName
on the klass, but themethodName
is also a klass assigned toclipPath
.For my use I've done following, which seems to work 🤞
I'm probably misunderstanding the code here, so any clarification would be useful.
Thanks
The text was updated successfully, but these errors were encountered: