Skip to content
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

New PR fo 4808 #4831

Merged
merged 3 commits into from
Mar 17, 2018
Merged

New PR fo 4808 #4831

merged 3 commits into from
Mar 17, 2018

Conversation

dennisrjohn
Copy link
Contributor

@dennisrjohn dennisrjohn commented Mar 16, 2018

Fixes #4808

@@ -1203,12 +1203,16 @@
*/
_getFontDeclaration: function(styleObject, forMeasuring) {
var style = styleObject || this;
var fontFamily = style.fontFamily === undefined ||
style.fontFamily.includes('\'') ||
style.fontFamily.includes('"')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry to be late with this comment.
includes is something forever supported by IE, just recently included in firefox and chrome as per new specs.
I think there is a string method that is supported by everyone and should be es5 compatible.
FabricJS is es5 and .includes is not.

@dennisrjohn
Copy link
Contributor Author

@asturur Right, we use an ES6 polyfill in webpack, so I didn't notice.

I changed the code to use indexOf instead of includes.

@asturur asturur merged commit 7698801 into fabricjs:master Mar 17, 2018
@asturur
Copy link
Member

asturur commented Mar 17, 2018

Thank you!

@asturur asturur mentioned this pull request Mar 17, 2018
thiagocunha pushed a commit to thiagocunha/fabric.js that referenced this pull request Nov 18, 2019
* new commit per asturur

* new commit per asturur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants