Protect against node types with reserved names such as toString

Fixes #880
This commit is contained in:
Nick O'Leary
2016-04-28 14:17:48 +01:00
parent 45ff86eae5
commit 0c53b5310a
2 changed files with 11 additions and 7 deletions

View File

@@ -105,7 +105,7 @@ module.exports = {
config.forEach(function(n) {
if (n.type !== 'subflow' && n.type !== 'tab') {
for (var prop in n) {
if (n.hasOwnProperty(prop) && prop !== 'id' && prop !== 'wires' && prop !== '_users' && flow.configs[n[prop]]) {
if (n.hasOwnProperty(prop) && prop !== 'id' && prop !== 'wires' && prop !== 'type' && prop !== '_users' && flow.configs[n[prop]]) {
// This property references a global config node
flow.configs[n[prop]]._users.push(n.id)
}