mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Allow get
and keys
to be called without callback
This commit is contained in:
@@ -220,7 +220,7 @@ function createContext(id,seed) {
|
||||
callback = storage;
|
||||
storage = "_";
|
||||
}
|
||||
if (typeof callback !== 'function'){
|
||||
if (callback && typeof callback !== 'function'){
|
||||
throw new Error("Callback must be a function");
|
||||
}
|
||||
context = getContextStorage(storage);
|
||||
@@ -279,7 +279,7 @@ function createContext(id,seed) {
|
||||
callback = storage;
|
||||
storage = "_";
|
||||
}
|
||||
if (typeof callback !== 'function') {
|
||||
if (callback && typeof callback !== 'function') {
|
||||
throw new Error("Callback must be a function");
|
||||
}
|
||||
context = getContextStorage(storage);
|
||||
|
Reference in New Issue
Block a user