File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 44 * This is the web browser implementation of `debug()`.
55 */
66
7- exports . log = log ;
87exports . formatArgs = formatArgs ;
98exports . save = save ;
109exports . load = load ;
@@ -170,18 +169,14 @@ function formatArgs(args) {
170169}
171170
172171/**
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`.
175176 *
176177 * @api public
177178 */
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 || ( ( ) => { } ) ;
185180
186181/**
187182 * Save `namespaces`.
You can’t perform that action at this time.
0 commit comments