unabridged / motion

Reactive frontend UI components for Rails in pure Ruby
https://github.com/unabridged/motion
MIT License
697 stars 19 forks source link

Fix issue copying properties from Event objects #57

Closed latortuga closed 4 years ago

latortuga commented 4 years ago

Fixes #55

Destructuring assignment on event objects transpiles to a call to Object.prototype.hasOwnProperty which is always false for Event objects. Instead, we can copy the fields directly.

latortuga commented 4 years ago

Gonna add some tests for this before merging.

latortuga commented 4 years ago

Turns out my Rails 5.1 appraisal was not actually working correctly. So I took the opportunity to fix it up in this branch as well. Not ideal but I'm already neck-deep!