From 631b914d822bdc355c2237a40c90dab02c481705 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Fri, 17 Jul 2015 13:52:37 +0200 Subject: [PATCH] log the error message when the stack trace is not available --- lib/sparks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sparks.js b/lib/sparks.js index e3c7c6a..13b4565 100644 --- a/lib/sparks.js +++ b/lib/sparks.js @@ -55,7 +55,7 @@ module.exports = function(options) { primus.on('log', function(type) { if (type === 'error') { var err = arguments[1]; - console.error(err.stack); + console.error(err.stack || err.message); } }); -- 2.54.0