diff options
Diffstat (limited to 'content_scripts/mode.coffee')
| -rw-r--r-- | content_scripts/mode.coffee | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index 10b7bb2a..76b65a12 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -76,7 +76,9 @@ class Mode exit: -> console.log @count, "exit:", @name - handlerStack.remove handlerId for handlerId in @handlers + # We reverse @handlers, here. That way, handlers are popped in the opposite order to that in which they + # were pushed. + handlerStack.remove handlerId for handlerId in @handlers.reverse() Mode.modes = Mode.modes.filter (mode) => mode != @ Mode.updateBadge() |
