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

Handle other error types in Manage Palette view

We still get [object Object] appearing in the palette manager sometimes.
This fix nails down another cause - where the err property has a 'code'
but no 'message' property. This happens with the type_already_registered
error
This commit is contained in:
Nick O'Leary 2021-07-21 17:26:19 +01:00
parent efdf689c31
commit 4ef7240598
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -264,6 +264,8 @@ RED.palette.editor = (function() {
var errMessage = set.err; var errMessage = set.err;
if (set.err.message) { if (set.err.message) {
errMessage = set.err.message; errMessage = set.err.message;
} else if (set.err.code) {
errMessage = set.err.code;
} }
$("<li>").text(errMessage).appendTo(nodeEntry.errorList); $("<li>").text(errMessage).appendTo(nodeEntry.errorList);
} }