Skip to content

Node.js based forum software built for the modern web

if stack is undefined fallback to message and then to hardcoded string

Barış Soner Uşaklıc2b0be1f2c1c
diff --git a/src/meta/minifier.js b/src/meta/minifier.js
index c48bbb890f..14da9beb93 100644
--- a/src/meta/minifier.js
+++ b/src/meta/minifier.js
@@ -112,7 +112,7 @@ if (process.env.minifier_child) {
if (err) {
process.send({
type: 'error',
- message: err.stack,
+ message: err.stack || err.message || 'unknown error',
});
return;
}
@@ -277,7 +277,7 @@ function buildCSS(data, callback) {
from: undefined,
}).then(function (result) {
process.nextTick(callback, null, { code: result.css });
- }, function (err) {
+ }).catch(function (err) {
process.nextTick(callback, err);
});
});