From 1420fa8fcca9e13577acadf19c52c30b6c98ea23 Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Tue, 27 Jun 2017 13:50:08 +0300 Subject: [PATCH] Fixes the old snapshot build (#4457) --- tns-core-modules/globals/globals.ts | 2 +- tns-core-modules/ui/frame/activity.android.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tns-core-modules/globals/globals.ts b/tns-core-modules/globals/globals.ts index a75fced90..d4b5ed6f9 100644 --- a/tns-core-modules/globals/globals.ts +++ b/tns-core-modules/globals/globals.ts @@ -88,7 +88,7 @@ function registerOnGlobalContext(name: string, module: string): void { let snapshotGlobals; export function install() { - if ((global).__snapshotEnabled) { + if ((global).__snapshot || (global).__snapshotEnabled) { if (!snapshotGlobals) { // require in snapshot mode is cheap var timer: typeof timerModule = require("timer"); diff --git a/tns-core-modules/ui/frame/activity.android.ts b/tns-core-modules/ui/frame/activity.android.ts index 9ce37f785..7ab8677ee 100644 --- a/tns-core-modules/ui/frame/activity.android.ts +++ b/tns-core-modules/ui/frame/activity.android.ts @@ -2,7 +2,7 @@ import { setActivityCallbacks, AndroidActivityCallbacks } from "./frame"; import * as globals from "../../globals"; import * as appModule from "../../application"; -if ((global).__snapshotEnabled) { +if ((global).__snapshot || (global).__snapshotEnabled) { globals.install(); }