Don't fail loading pages when their JS comes after pageAfterIn fires
This commit is contained in:
parent
75d1f2322e
commit
0acab8e789
@ -19,7 +19,14 @@ var routes = [
|
||||
},
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
loadHomePage(function () {});
|
||||
function tryToLoadHomePage() {
|
||||
if (typeof loadHomePage != "function") {
|
||||
setTimeout(tryToLoadHomePage, 500);
|
||||
} else {
|
||||
loadHomePage(function () {});
|
||||
}
|
||||
}
|
||||
tryToLoadHomePage();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -39,7 +46,14 @@ var routes = [
|
||||
name: 'sendmoney',
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
loadSendMoneyPage();
|
||||
function tryToLoadSendMoneyPage() {
|
||||
if (typeof loadSendMoneyPage != "function") {
|
||||
setTimeout(tryToLoadSendMoneyPage, 500);
|
||||
} else {
|
||||
loadSendMoneyPage();
|
||||
}
|
||||
}
|
||||
tryToLoadSendMoneyPage();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -54,7 +68,14 @@ var routes = [
|
||||
name: 'addfunds',
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
initPaymentPage();
|
||||
function tryToInitPaymentPage() {
|
||||
if (typeof initPaymentPage != "function") {
|
||||
setTimeout(tryToInitPaymentPage, 500);
|
||||
} else {
|
||||
initPaymentPage();
|
||||
}
|
||||
}
|
||||
tryToInitPaymentPage();
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -69,7 +90,14 @@ var routes = [
|
||||
name: 'updateprofile',
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
loadProfilePage();
|
||||
function tryToLoadProfilePage() {
|
||||
if (typeof loadProfilePage != "function") {
|
||||
setTimeout(tryToLoadProfilePage, 500);
|
||||
} else {
|
||||
loadProfilePage();
|
||||
}
|
||||
}
|
||||
tryToLoadProfilePage();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user