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

Merge pull request #2238 from teastman/master

Handle undefined node._def in edit stack title.
This commit is contained in:
Nick O'Leary 2019-07-29 10:44:54 +01:00 committed by GitHub
commit e41b292e54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -517,7 +517,7 @@ RED.editor = (function() {
} else if (node.type.indexOf("subflow:")===0) {
var subflow = RED.nodes.subflow(node.type.substring(8));
label = RED._("subflow.editSubflowInstance",{name:RED.utils.sanitize(subflow.name)})
} else {
} else if (node._def !== undefined) {
if (typeof node._def.paletteLabel !== "undefined") {
try {
label = RED.utils.sanitize((typeof node._def.paletteLabel === "function" ? node._def.paletteLabel.call(node._def) : node._def.paletteLabel)||"");