We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ea7365 commit de7e787Copy full SHA for de7e787
tns-core-modules/globals/globals.ts
@@ -121,7 +121,11 @@ if ((<any>global).__snapshot) {
121
registerOnGlobalContext("fetch", "fetch");
122
}
123
124
-if (!(<any>global).console) {
+// check whether the 'android' namespace is exposed
125
+// if positive - the current device is an Android
126
+// so a custom implementation of the global 'console' object is attached.
127
+// otherwise do nothing on iOS - the NS runtime provides a native 'console' functionality.
128
+if ((<any>global).android) {
129
const consoleModule = require("console");
130
(<any>global).console = new consoleModule.Console();
131
0 commit comments