mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
application should not crash when start() method called multiple times
This commit is contained in:
@ -217,7 +217,11 @@ global.__onUncaughtError = function (error: Error) {
|
|||||||
definition.notify({ eventName: definition.uncaughtErrorEvent, object: <any>definition.ios, ios: error });
|
definition.notify({ eventName: definition.uncaughtErrorEvent, object: <any>definition.ios, ios: error });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var started: boolean = false;
|
||||||
exports.start = function () {
|
exports.start = function () {
|
||||||
appModule.loadCss();
|
if (!started) {
|
||||||
UIApplicationMain(0, null, null, exports.ios && exports.ios.delegate ? NSStringFromClass(exports.ios.delegate) : NSStringFromClass(Responder));
|
appModule.loadCss();
|
||||||
|
UIApplicationMain(0, null, null, exports.ios && exports.ios.delegate ? NSStringFromClass(exports.ios.delegate) : NSStringFromClass(Responder));
|
||||||
|
started = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user