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

Warn if a node references an unknown config node type

Closes #709
This commit is contained in:
Nick O'Leary 2015-09-25 23:17:57 +01:00
parent c0b8f5e3e1
commit 4a0222bd1c

View File

@ -572,11 +572,16 @@ RED.editor = (function() {
if (definition.defaults.hasOwnProperty(d)) {
if (definition.defaults[d].type) {
var configTypeDef = RED.nodes.getType(definition.defaults[d].type);
if (configTypeDef && configTypeDef.exclusive) {
if (configTypeDef) {
if (configTypeDef.exclusive) {
prepareConfigNodeButton(node,d,definition.defaults[d].type);
} else {
prepareConfigNodeSelect(node,d,definition.defaults[d].type);
}
} else {
console.log("Unknown type:", definition.defaults[d].type);
preparePropertyEditor(node,d,prefix);
}
} else {
preparePropertyEditor(node,d,prefix);
}