From 343588b2a07f2ffe7f5e51367d1bec01622dbd2c Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 20 Jun 2016 10:19:18 +0100 Subject: [PATCH] Support array references in Debug property field --- CHANGELOG.md | 6 ++++++ nodes/core/core/58-debug.js | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 70df0a526..0fba6d9be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +#### xxx: unreleased + +Fixes + + - Support array references in Debug property field + #### 0.14.1: Maintenance Release Fixes diff --git a/nodes/core/core/58-debug.js b/nodes/core/core/58-debug.js index 53f56eb06..491f49060 100644 --- a/nodes/core/core/58-debug.js +++ b/nodes/core/core/58-debug.js @@ -50,12 +50,9 @@ module.exports = function(RED) { var output = msg[property]; if (this.complete !== "false" && typeof this.complete !== "undefined") { property = this.complete; - var propertyParts = property.split("."); try { - output = propertyParts.reduce(function (obj, i) { - return obj[i]; - }, msg); - } catch (err) { + output = RED.util.getMessageProperty(msg,this.complete); + } catch(err) { output = undefined; } }