From bbffa5480e6408fc9122e135a1314e2a190cbbd5 Mon Sep 17 00:00:00 2001 From: Panayot Cankov Date: Fri, 23 Jun 2017 17:30:41 +0300 Subject: [PATCH] Used the wrong flag to check if snapshot was enabled (#4446) --- 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 a30080cb1..a75fced90 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).__snapshot) { + if ((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 ef137a1f5..9ce37f785 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).__snapshot) { +if ((global).__snapshotEnabled) { globals.install(); }