knownasilya / ember-toggle

Checkbox based Toggle Switches for Ember
http://knownasilya.github.io/ember-toggle/
MIT License
112 stars 52 forks source link

Assertion Failed #146

Closed sergchernata closed 4 years ago

sergchernata commented 4 years ago

This error happens exclusively when I navigate away from a view that contains the toggle. Flipping the toggle works fine.

Uncaught (in promise) Error: Assertion Failed: You attempted to update __instance on <app@component:x-toggle-switch::ember346>, but it had already been used previously in the same computation. Attempting to update a value after using it in a computation can cause logical errors, infinite revalidation bugs, and performance issues, and is not supported.

DEBUG: ------------------------------- instrument.js:147 DEBUG: Ember : 3.22.0 instrument.js:147 DEBUG: Ember Data : 3.22.0 instrument.js:147 DEBUG: Ember Bootstrap : 4.3.0 instrument.js:147 DEBUG: Ember Simple Auth : 3.0.1 instrument.js:147 DEBUG: EmberFire : 3.0.0-rc.6 instrument.js:147 DEBUG: Firebase : 7.20.0 DEBUG: -------------------------------

rwjblue commented 4 years ago

Seems like the same thing as https://github.com/emberjs/ember.js/issues/19192.

sergchernata commented 4 years ago

Sure does, any ETA on the fix? @rwjblue

rwjblue commented 4 years ago

Fix already landed in the latest betas, I'll be working on backporting for 3.22.1 release this week.

sergchernata commented 4 years ago

@rwjblue Thank you, I appreciate it.

knownasilya commented 4 years ago

Btw we are removing ember-gestures from this addon, so it should work even in affected versions once released. @nickschot any chance you'll have time to work on those pointer gestures?

nickschot commented 4 years ago

@knownasilya I have prepared a PR for ember-gesture-modifiers with PointerEvents support. https://github.com/nickschot/ember-gesture-modifiers/pull/16 Want to try it before I release it?