-
Notifications
You must be signed in to change notification settings - Fork 12k
Error if style is null (Bugfix) #4781
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
Conversation
I tested in Chrome and when style(line 50) is null, style.toString is undefined Reason: typeof null equals "object" (at least in Chrome)
|
should do the same :) |
| var type, edgeLength, xOffset, yOffset, height, size; | ||
|
|
||
| if (typeof style === 'object') { | ||
| if (style && typeof style === 'object') { |
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.
if (helpers.isObject(style))
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.
Actually, helpers.isObject doesn't work in this case since it returns true only for plain object.
|
Console (Chrome V8):
|
|
im so sry, can you revert the second change from this request |
|
My fault, |
|
i reverted the change also in my repo |
simonbrunel
left a comment
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.
Thanks!
I tested in Chrome and when style(line 50) is null, style.toString is undefined Reason: typeof null equals "object" (at least in Chrome)
I tested in Chrome and when style(line 50) is null, style.toString is undefined Reason: typeof null equals "object" (at least in Chrome)
I tested in Chrome and when style(line 50) is null, style.toString is undefined
Reason: typeof null equals "object" (at least in Chrome)