Fix onunload being called with incorrect context

This commit is contained in:
Toby Zerner 2015-04-12 20:19:36 +09:30
parent 9e558c199c
commit d25f1c83af

View file

@ -568,7 +568,7 @@ var m = (function app(window, undefined) {
var isPrevented = false;
var event = {preventDefault: function() {isPrevented = true}};
for (var i = 0, unloader; unloader = unloaders[i]; i++) {
unloader.handler(event)
unloader.handler.call(unloader.controller, event)
unloader.controller.onunload = null
}
if (isPrevented) {