mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix global.keys() bug in function node (#1417)
* Fix global.keys() bug in function node * Filter set(), get() and keys() in global.keys() method
This commit is contained in:
committed by
Nick O'Leary
parent
3479c794de
commit
0634a97598
@@ -28,7 +28,14 @@ function createContext(id,seed) {
|
||||
util.setMessageProperty(data,key,value);
|
||||
}
|
||||
obj.keys = function() {
|
||||
return Object.keys(data);
|
||||
var keysData = Object.keys(data);
|
||||
if (seed == null) {
|
||||
return keysData;
|
||||
} else {
|
||||
return keysData.filter(function (key) {
|
||||
return key !== "set" && key !== "get" && key !== "keys";
|
||||
});
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
Reference in New Issue
Block a user