Current behaviour results in:
Chrome 65 (initial)
> ▶ [WARN] Error: foo Error: foo
> at bar
> at main
Chrome 65 (expanded)
> ▼ [WARN] Error: foo Error: foo
> at bar
> at main
> at logError
> at main
Safari 11 (initial)
> ▶ [WARN] Error: foo, Error: foo
Safari 11 (expanded)
> ▼ [WARN] Error: foo is undefined
> * Error: foo is undefined
> at bar
> at main
Firefox 57
> [WARN] Error: foo | Error: foo
> | Stacktrace:
> | bar
> | main
I don't recall why I did it this way, but it seems redundant.
This commit effectively removes the first "Error: foo"
Change-Id: Idc5dee34ce2b5068e3a2d8800e2b5f6b879525d1
// If we have an exception object, log it to the warning channel to trigger
// proper stacktraces in browsers that support it.
if ( e && console.warn ) {
- console.warn( String( e ), e );
+ console.warn( e );
}
}
/* eslint-enable no-console */