Commit 5528572 committed Dec 19, 2018 Unverified
1 parent c0127b1 commit 5528572 Copy full SHA for 5528572
File tree 1 file changed +5
-10
lines changed
1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 4
4
* This is the web browser implementation of `debug()`.
5
5
*/
6
6
7
- exports . log = log ;
8
7
exports . formatArgs = formatArgs ;
9
8
exports . save = save ;
10
9
exports . load = load ;
@@ -170,18 +169,14 @@ function formatArgs(args) {
170
169
}
171
170
172
171
/**
173
- * Invokes `console.log()` when available.
174
- * No-op when `console.log` is not a "function".
172
+ * Invokes `console.debug()` when available.
173
+ * No-op when `console.debug` is not a "function".
174
+ * If `console.debug` is not available, falls back
175
+ * to `console.log`.
175
176
*
176
177
* @api public
177
178
*/
178
- function log ( ...args ) {
179
- // This hackery is required for IE8/9, where
180
- // the `console.log` function doesn't have 'apply'
181
- return typeof console === 'object' &&
182
- console . log &&
183
- console . log ( ...args ) ;
184
- }
179
+ exports . log = console . debug || console . log || ( ( ) => { } ) ;
185
180
186
181
/**
187
182
* Save `namespaces`.
You can’t perform that action at this time.
0 commit comments