visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

page.stop should unregister clickHandler only if page.start previously registered it #517

Closed jsnajdr closed 5 years ago

jsnajdr commented 5 years ago

If the app code registered the handler or didn't register it at all, then page.stop shouldn't try to unregister it -- it doesn't own the handler.

Sort of depends on #508 being fixed, as currently the clickHandler is always registered at least once, even if the app never asked for it.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 92.149% when pulling e8354bccf4a46f212698c0a5d29214eb4b8f00bd on jsnajdr:fix-remove-click-listener into df926c20425a984afafe1cbe1a2a22b33b368a0a on visionmedia:master.