Ensure config._flow is non-enumerable so is ignored by JSON.stringify

Fixes  https://github.com/pdmangel/node-red-contrib-openhab2/issues/36
This commit is contained in:
Nick O'Leary 2019-03-18 15:11:56 +00:00
parent a242475b38
commit 962a29110c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 1 additions and 1 deletions

View File

@ -479,7 +479,7 @@ module.exports = {
}
}
try {
conf._flow = flow;
Object.defineProperty(conf,'_flow', {value: flow, enumerable: false, writable: true })
newNode = new nodeTypeConstructor(conf);
} catch (err) {
Log.log({