File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ function MagicPen(options) {
31
31
}
32
32
}
33
33
34
- if ( typeof window !== 'undefined' && typeof window . navigator !== 'undefined' ) {
34
+ if ( typeof exports === 'object' && typeof exports . nodeName !== 'string' && require ( 'supports-color' ) ) {
35
+ MagicPen . defaultFormat = 'ansi' ; // colored console
36
+ } else if ( typeof window !== 'undefined' && typeof window . navigator !== 'undefined' ) {
35
37
if ( window . mochaPhantomJS || ( window . __karma__ && window . __karma__ . config . captureConsole ) ) {
36
38
MagicPen . defaultFormat = 'ansi' ; // colored console
37
39
} else {
38
40
MagicPen . defaultFormat = 'html' ; // Browser
39
41
}
40
- } else if ( require ( 'supports-color' ) ) {
41
- MagicPen . defaultFormat = 'ansi' ; // colored console
42
42
} else {
43
43
MagicPen . defaultFormat = 'text' ; // Plain text
44
44
}
You can’t perform that action at this time.
0 commit comments