1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Ensure 2nd arg to node.error is an object

Fixes #2228
This commit is contained in:
Nick O'Leary 2019-08-12 14:36:26 +01:00
parent ac3ef9b6fc
commit e5255b0c7c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -272,7 +272,7 @@ Node.prototype.error = function(logMessage,msg) {
logMessage = logMessage || ""; logMessage = logMessage || "";
} }
var handled = false; var handled = false;
if (msg) { if (msg && typeof msg === 'object') {
handled = this._flow.handleError(this,logMessage,msg); handled = this._flow.handleError(this,logMessage,msg);
} }
if (!handled) { if (!handled) {