mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
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:
@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user