Skip to content
This repository was archived by the owner on May 1, 2020. It is now read-only.

Commit 8e64407

Browse files
committed
fix(serve): fix --consolelogs/--serverlogs usage with Cordova console plugin
fixes ionic-team/ionic-cli#2243
1 parent 8f71e35 commit 8e64407

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bin/ion-dev.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,10 @@ window.IonicDevServer = {
169169
})();
170170
}
171171

172-
for (var consoleType in console) {
173-
if (console.hasOwnProperty(consoleType) && typeof console[consoleType] === 'function') {
174-
patchConsole(consoleType);
175-
}
172+
// https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-console/#supported-methods
173+
var consoleFns = ['log', 'error', 'exception', 'warn', 'info', 'debug', 'assert', 'dir', 'dirxml', 'time', 'timeEnd', 'table'];
174+
for (var i in consoleFns) {
175+
patchConsole(consoleFns[i]);
176176
}
177177
},
178178

0 commit comments

Comments
 (0)