Fix an issue where variable lookup would error if stage did not exist.

This commit is contained in:
Paul Kaplan 2018-06-05 10:45:51 -04:00
parent ca6a7f9311
commit 7b2f606316

View file

@ -154,7 +154,7 @@ class Target extends EventEmitter {
// If the stage has a global copy, return it.
if (this.runtime && !this.isStage) {
const stage = this.runtime.getTargetForStage();
if (stage.variables.hasOwnProperty(id)) {
if (stage && stage.variables.hasOwnProperty(id)) {
return stage.variables[id];
}
}