When clearing the runtime, emit has cloud data update.

This commit is contained in:
Karishma Chadha 2018-11-26 13:41:23 -05:00
parent b828444ea8
commit 6d033af61e

View file

@ -1540,6 +1540,16 @@ class Runtime extends EventEmitter {
this.targets.map(this.disposeTarget, this); this.targets.map(this.disposeTarget, this);
this._monitorState = OrderedMap({}); this._monitorState = OrderedMap({});
// @todo clear out extensions? turboMode? etc. // @todo clear out extensions? turboMode? etc.
// *********** Cloud *******************
// If the runtime currently has cloud data,
// emit a has cloud data update event resetting
// it to false
if (this.hasCloudData()) {
this.emit(Runtime.HAS_CLOUD_DATA_UPDATE, false);
}
this.ioDevices.cloud.clear(); this.ioDevices.cloud.clear();
// Reset runtime cloud data info // Reset runtime cloud data info
@ -1548,7 +1558,6 @@ class Runtime extends EventEmitter {
this.canAddCloudVariable = newCloudDataManager.canAddCloudVariable; this.canAddCloudVariable = newCloudDataManager.canAddCloudVariable;
this.addCloudVariable = this._initializeAddCloudVariable(newCloudDataManager); this.addCloudVariable = this._initializeAddCloudVariable(newCloudDataManager);
this.removeCloudVariable = this._initializeRemoveCloudVariable(newCloudDataManager); this.removeCloudVariable = this._initializeRemoveCloudVariable(newCloudDataManager);
} }
/** /**