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

Fix reporting of type_already_registered error

This commit is contained in:
Nick O'Leary 2021-07-12 16:09:25 +01:00
parent 36eddabc1c
commit b01c5a05e7
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -194,7 +194,7 @@ function addModule(module) {
if (!set.err) {
set.types.forEach(function(t) {
if (nodeTypeToId.hasOwnProperty(t)) {
set.err = "Type already registered";
set.err = new Error("Type already registered");
set.err.code = "type_already_registered";
set.err.details = {
type: t,