mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix context admin api for empty contexts
This commit is contained in:
parent
9bbe405cd0
commit
4e4a1f11e6
@ -50,6 +50,9 @@ module.exports = {
|
||||
ctx.keys(function(err, keys) {
|
||||
var result = {};
|
||||
var c = keys.length;
|
||||
if (c === 0) {
|
||||
res.json(result);
|
||||
} else {
|
||||
keys.forEach(function(key) {
|
||||
ctx.get(key,function(err, v) {
|
||||
result[key] = util.encodeObject({msg:v});
|
||||
@ -59,6 +62,7 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user