mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix issue with old inject nodes that migrated topic to 'string' type
This commit is contained in:
@@ -539,7 +539,7 @@
|
||||
var propertyValue = $('<input/>',{class:"node-input-prop-property-value",type:"text"})
|
||||
.css("width","calc(70% - 30px)")
|
||||
.appendTo(row)
|
||||
.typedInput({default:prop.vt,types:['flow','global','str','num','bool','json','bin','date','jsonata','env','msg']});
|
||||
.typedInput({default:prop.vt || 'str',types:['flow','global','str','num','bool','json','bin','date','jsonata','env','msg']});
|
||||
|
||||
propertyName.typedInput('value',prop.p);
|
||||
propertyValue.typedInput('value',prop.v);
|
||||
@@ -562,7 +562,7 @@
|
||||
var topic = {
|
||||
p:'topic',
|
||||
v: node.topic ? node.topic : '',
|
||||
vt:'string'
|
||||
vt:'str'
|
||||
}
|
||||
node.props = [payload,topic];
|
||||
}
|
||||
@@ -578,6 +578,11 @@
|
||||
newProp.v = node.topic ? node.topic : '';
|
||||
}
|
||||
}
|
||||
if (newProp.vt === "string") {
|
||||
// Fix bug in pre 2.1 where an old Inject node might have
|
||||
// a migrated rule with type 'string' not 'str'
|
||||
newProp.vt = "str";
|
||||
}
|
||||
eList.editableList('addItem',newProp);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user