mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
fix(livesync): attach __onLiveSyncCore to global object (#4215)
That method needs to be exposed because it's used in NativeScript Angular (https://github.com/NativeScript/nativescript-angular/blob/master/nativescript-angular/platform-common.ts#L91).
This commit is contained in:
@ -24,7 +24,7 @@ function onLivesync(args: EventData): void {
|
||||
}
|
||||
|
||||
try {
|
||||
reloadPage();
|
||||
g.__onLiveSyncCore();
|
||||
} catch (ex) {
|
||||
// Show the error as modal page, save reference to the page in global context.
|
||||
g.errorPage = parse(`<Page><ScrollView><Label text="${ex}" textWrap="true" style="color: red;" /></ScrollView></Page>`);
|
||||
@ -74,6 +74,9 @@ export function reloadPage(): void {
|
||||
}
|
||||
}
|
||||
|
||||
// attach on global, so it can be overwritten in NativeScript Angular
|
||||
(<any>global).__onLiveSyncCore = reloadPage;
|
||||
|
||||
export function resolvePageFromEntry(entry: NavigationEntry): Page {
|
||||
let page: Page;
|
||||
|
||||
|
Reference in New Issue
Block a user