Skip to content

Commit

Permalink
Ensure 2nd arg to node.error is an object
Browse files Browse the repository at this point in the history
Fixes #2228
  • Loading branch information
knolleary committed Aug 12, 2019
1 parent ac3ef9b commit e5255b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/node_modules/@node-red/runtime/lib/nodes/Node.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Node.prototype.error = function(logMessage,msg) {
logMessage = logMessage || "";
}
var handled = false;
if (msg) {
if (msg && typeof msg === 'object') {
handled = this._flow.handleError(this,logMessage,msg);
}
if (!handled) {
Expand Down

0 comments on commit e5255b0

Please sign in to comment.