-
-
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
fix(): weird toJson
bug
#8111
fix(): weird toJson
bug
#8111
Conversation
Code Coverage Summary
|
Code Coverage Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to go
I wonder why this does not happen in master but just on prs. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify this the part of the spec we are interested in. Thanks for this investigation |
i wonder why was never a problem before today. We had zero transpilation before |
* canvas.includeDefaultValues = false; | ||
* var json = canvas.toJSON(); | ||
*/ | ||
fabric.StaticCanvas.prototype.toJSON = fabric.StaticCanvas.prototype.toObject; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was probably my fault.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
11 years this bug and no one was armed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then comes @ShaMan123 ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤪
JSON.stringify passes an empty string as first param
It causes a bug in
toObject
as it passes a string aspropsToInclude
So I removed the params from the signature
No need for them anyways, and if someone does need them they should use
toObject
DISABLED
lint
testQUICK MERGE