Merge pull request #3840 from NativeScript/pete/fix-android-console

Fix: attach android console implementation always when snapshot is enabled
This commit is contained in:
Alexander Vakrilov
2017-03-21 16:43:51 +02:00
committed by GitHub

View File

@ -125,7 +125,7 @@ if ((<any>global).__snapshot) {
// if positive - the current device is an Android // if positive - the current device is an Android
// so a custom implementation of the global 'console' object is attached. // so a custom implementation of the global 'console' object is attached.
// otherwise do nothing on iOS - the NS runtime provides a native 'console' functionality. // otherwise do nothing on iOS - the NS runtime provides a native 'console' functionality.
if ((<any>global).android) { if ((<any>global).android || (<any>global).__snapshot) {
const consoleModule = require("console"); const consoleModule = require("console");
(<any>global).console = new consoleModule.Console(); (<any>global).console = new consoleModule.Console();
} }