-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Fixing issue #1318 #1319
Fixing issue #1318 #1319
Conversation
Workaround while waiting for madrobby/zepto#1319
Workaround while waiting for madrobby/zepto#1319
src/event.js
Outdated
e.data = data | ||
var dataPropDescriptor = Object.getOwnPropertyDescriptor(e, 'data') | ||
if (!dataPropDescriptor || dataPropDescriptor.writable) | ||
e.data = data |
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.
It seems that when using strict mode dataPropDescriptor
will be undefined when e
is InputEvent
(even though data
property exists). Seems like a bug to me. To workaround this I would propose to wrap this line around a try/catch and add a comment about this.
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 would fix #1256 too
why this fixed is not merged? |
Do I need to do anything? Why isn't it merged already? |
fix: apply patch madrobby/zepto#1319
Some event object have readonly data property - I've added test for that.
#1318