From 90a0da286397674365e3a4024ee6e2e3b08eefea Mon Sep 17 00:00:00 2001 From: Stanimira Vlaeva Date: Thu, 18 May 2017 17:13:24 +0300 Subject: [PATCH] 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). --- tns-core-modules/ui/frame/frame-common.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tns-core-modules/ui/frame/frame-common.ts b/tns-core-modules/ui/frame/frame-common.ts index 4b5da5ed8..ebf8970f0 100644 --- a/tns-core-modules/ui/frame/frame-common.ts +++ b/tns-core-modules/ui/frame/frame-common.ts @@ -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(``); @@ -74,6 +74,9 @@ export function reloadPage(): void { } } +// attach on global, so it can be overwritten in NativeScript Angular +(global).__onLiveSyncCore = reloadPage; + export function resolvePageFromEntry(entry: NavigationEntry): Page { let page: Page;