Skip to content

Prevent error on mixin when remove innexisting listener ember 3.12#317

Open
romgere wants to merge 1 commit intomike-north:masterfrom
romgere:master
Open

Prevent error on mixin when remove innexisting listener ember 3.12#317
romgere wants to merge 1 commit intomike-north:masterfrom
romgere:master

Conversation

@romgere
Copy link

@romgere romgere commented Feb 28, 2020

On ember 3.12, on acceptance test we encountered the error below :

You attempted to remove a function listener which did not exist on the instance, which means you may have attempted to remove it before it was added.

The error is throwed by the resize-aware mixin inside the willDestroyElement method when trying to remove the didResize and/or debouncedDidResize listener.
From my understanding, the willDestroyElement is called without a call to didInsertElement.

This PR aim to fix this.

Related to #316

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant