#931 prevent unloaders from being registered more than once
This commit is contained in:
parent
56a51664b7
commit
58ef29e8d5
1 changed files with 1 additions and 1 deletions
|
|
@ -736,7 +736,7 @@
|
||||||
var unloaders = []
|
var unloaders = []
|
||||||
|
|
||||||
function updateLists(views, controllers, view, controller) {
|
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({
|
unloaders.push({
|
||||||
controller: controller,
|
controller: controller,
|
||||||
handler: controller.onunload
|
handler: controller.onunload
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue