knownasilya / ember-toggle

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

Rendering errors in Ember 3.20 #147

Closed slovenlyimp closed 4 years ago

slovenlyimp commented 4 years ago

I upgraded my application from Ember 2.18 to 3.20. Now, when transitioning away from the route that uses {{x-toggle}} causes a runtime error.

Assertion Failed: You attempted to update `__instance` on 
  `<my-app@component:x-toggle-switch::ember1715>`, 
  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.

Linking the code in master, I get the error when entering the route.

Error: Assertion Failed: You attempted to update `pan` on `(unknown object)`, 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.

`pan` was first used:

- While rendering:
  application
    my-component
      my-component/child-component
        my-route-1
          my-route-1.my-route-2
            x-toggle
              x-toggle-switch
knownasilya commented 4 years ago

Duplicate of #146

slovenlyimp commented 4 years ago

For historical purposes, I agree this was a duplicate of https://github.com/knownasilya/ember-toggle/issues/146, I was using ember-cli@3.20, but had accidentally upgraded ember-source to 3.22.