Ensure all nodes have access to global context

Fixes #1230
This commit is contained in:
Nick O'Leary 2017-04-12 20:48:43 +01:00
parent 36e1b2ba08
commit d1c42262d6
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ Node.prototype.updateWires = function(wires) {
} }
Node.prototype.context = function() { Node.prototype.context = function() {
if (!this._context) { if (!this._context) {
this._context = context.get(this._alias||this.id,this.z); this._context = context.get(this._alias||this.id,this.z);
} }
return this._context; return this._context;
} }

View File

@ -44,9 +44,9 @@ function getContext(localId,flowId) {
var newContext = createContext(contextId); var newContext = createContext(contextId);
if (flowId) { if (flowId) {
newContext.flow = getContext(flowId); newContext.flow = getContext(flowId);
if (globalContext) { }
newContext.global = globalContext; if (globalContext) {
} newContext.global = globalContext;
} }
contexts[contextId] = newContext; contexts[contextId] = newContext;
return newContext; return newContext;