Update file, http and email nodes to only show deprecation warning

if msg property is a real overide  to node property ( !== ).

Fix for comment by @drJeckyll  to Issue #399
This commit is contained in:
Dave C-J
2014-12-01 22:58:25 +00:00
parent e9b1e287ba
commit 5f74a1d237
3 changed files with 8 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ module.exports = function(RED) {
this.on("input",function(msg) {
var filename;
if (msg.filename) {
if (n.filename) {
if (n.filename && (n.filename !== msg.filename)) {
node.warn("Deprecated: msg properties should not override set node properties. See bit.ly/nr-override-msg-props");
}
filename = msg.filename;
@@ -89,7 +89,7 @@ module.exports = function(RED) {
this.on("input",function(msg) {
var filename;
if (msg.filename) {
if (n.filename) {
if (n.filename && (n.filename !== msg.filename)) {
node.warn("Deprecated: msg properties should not override set node properties. See bit.ly/nr-override-msg-props");
}
filename = msg.filename;