ember-cli-swiper icon indicating copy to clipboard operation
ember-cli-swiper copied to clipboard

Ember 3.22 error on destroy

Open gedaiu opened this issue 5 years ago • 6 comments

It looks like this component is broken when used with ember 3.22:

Uncaught Error: Assertion Failed: You attempted to update `_swiper` on `<ogm@component:swiper-container::ember424>`, 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.

`_swiper` was first used:

- While rendering:
  application
    browse
      browse.sites

Stack trace for the update:

gedaiu avatar Oct 20 '20 21:10 gedaiu

Also getting this error in debug environment, it is fine in production though.

maxymczech avatar Oct 27 '20 17:10 maxymczech

Can confirm this is happening over here too.

dougestey avatar Mar 30 '21 15:03 dougestey

@Matt-Jensen Thoughts on this? It fixes the error, but I don't know enough about the internals of Swiper to be sure. If you think it's fine, I'll PR on this repo.

I think calling .destroy is enough, judging from their docs: Screenshot 2021-03-30 134043

dougestey avatar Mar 30 '21 16:03 dougestey

I don't work with Ember that much anymore. However if you have a fix for this issue I'd be more than happy to publish it!

Matt-Jensen avatar Mar 30 '21 18:03 Matt-Jensen

Thanks Matt - do you know who is maintaining this repo currently?

dougestey avatar Mar 31 '21 14:03 dougestey

Whomever wants to!

Matt-Jensen avatar Mar 31 '21 16:03 Matt-Jensen