#931 prevent unloaders from being registered more than once

This commit is contained in:
Leo Horie 2016-02-25 20:27:01 -05:00
parent 56a51664b7
commit 58ef29e8d5

View file

@ -736,7 +736,7 @@
var unloaders = []
function updateLists(views, controllers, view, controller) {
if (controller.onunload != null) {
if (controller.onunload != null && unloaders.map(function(u) {return u.handler}).indexOf(controller.onunload) < 0) {
unloaders.push({
controller: controller,
handler: controller.onunload