ftlabs / fruitmachine-media

FruitMachine helper that allows different setup and teardown callbacks to be called based on media queries
MIT License
6 stars 3 forks source link

Handle really long asynchronous events better. #9

Open AdaRoseCannon opened 10 years ago

AdaRoseCannon commented 10 years ago

Currently if a teardown is long enough that a second media queries can occur and complete before teardown is finished for the first. Then the helper will fire:

So you get the first setup before the first teardown is complete which can cause issues such as somethign getting seup twice or trying to do something before it is made usable by the first teardown.

matthew-andrews commented 10 years ago

Smells like an edge case. Can we add the adding of a proper test suite to the module a requirement of fixing this issue?

AdaRoseCannon commented 10 years ago

That sounds sensible.