Skip to content

Commit 0ace1ad

Browse files
committed
fix(livesync): attach __onLiveSyncCore to global
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).
1 parent cbbee3b commit 0ace1ad

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tns-core-modules/ui/frame/frame-common.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function onLivesync(args: EventData): void {
2424
}
2525

2626
try {
27-
reloadPage();
27+
g.__onLiveSyncCore();
2828
} catch (ex) {
2929
// Show the error as modal page, save reference to the page in global context.
3030
g.errorPage = parse(`<Page><ScrollView><Label text="${ex}" textWrap="true" style="color: red;" /></ScrollView></Page>`);
@@ -74,6 +74,9 @@ export function reloadPage(): void {
7474
}
7575
}
7676

77+
// attach on global, so it can be overwritten in NativeScript Angular
78+
(<any>global).__onLiveSyncCore = reloadPage;
79+
7780
export function resolvePageFromEntry(entry: NavigationEntry): Page {
7881
let page: Page;
7982

0 commit comments

Comments
 (0)