Skip to content

Commit 8a866fd

Browse files
committed
ie8 error message niceity
1 parent be5316e commit 8a866fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ define(function() {
1919
* @returns {String} formatted string, suitable for output to developers
2020
*/
2121
function formatError(e) {
22-
var s = typeof e === 'object' && e !== null && e.stack ? e.stack : formatObject(e);
22+
var s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e);
2323
return e instanceof Error ? s : s + ' (WARNING: non-Error used)';
2424
}
2525

0 commit comments

Comments
 (0)