Skip to content

Commit e7e87f7

Browse files
author
Alexander Vakrilov
authored
Merge pull request NativeScript#3840 from NativeScript/pete/fix-android-console
Fix: attach android console implementation always when snapshot is enabled
2 parents f8b13ac + 3177817 commit e7e87f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tns-core-modules/globals/globals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ if ((<any>global).__snapshot) {
125125
// if positive - the current device is an Android
126126
// so a custom implementation of the global 'console' object is attached.
127127
// otherwise do nothing on iOS - the NS runtime provides a native 'console' functionality.
128-
if ((<any>global).android) {
128+
if ((<any>global).android || (<any>global).__snapshot) {
129129
const consoleModule = require("console");
130130
(<any>global).console = new consoleModule.Console();
131131
}

0 commit comments

Comments
 (0)