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

View File

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