mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
Summary widget unsubscribe (#2364)
* Delete subscription handle to prevent double unsubscribe error * Do not attempt to render undefined telemetry datum
This commit is contained in:
committed by
Deep Tailor
parent
b7fa5c7ba8
commit
40d54df567
@ -237,6 +237,7 @@ define ([
|
|||||||
});
|
});
|
||||||
delete this.compositionObjs[objectId];
|
delete this.compositionObjs[objectId];
|
||||||
this.subscriptions[objectId](); //unsubscribe from telemetry source
|
this.subscriptions[objectId](); //unsubscribe from telemetry source
|
||||||
|
delete this.subscriptions[objectId];
|
||||||
this.eventEmitter.emit('remove', identifier);
|
this.eventEmitter.emit('remove', identifier);
|
||||||
|
|
||||||
if (_.isEmpty(this.compositionObjs)) {
|
if (_.isEmpty(this.compositionObjs)) {
|
||||||
|
@ -43,7 +43,7 @@ define([
|
|||||||
return evaluator.requestLatest(options)
|
return evaluator.requestLatest(options)
|
||||||
.then(function (latestDatum) {
|
.then(function (latestDatum) {
|
||||||
this.pool.release(evaluator);
|
this.pool.release(evaluator);
|
||||||
return [latestDatum];
|
return latestDatum ? [latestDatum] : [];
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -52,7 +52,10 @@ define([
|
|||||||
strategy: 'latest',
|
strategy: 'latest',
|
||||||
size: 1
|
size: 1
|
||||||
}).then(function (results) {
|
}).then(function (results) {
|
||||||
if (this.destroyed || this.hasUpdated || this.renderTracker !== renderTracker) {
|
if (this.destroyed ||
|
||||||
|
this.hasUpdated ||
|
||||||
|
this.renderTracker !== renderTracker ||
|
||||||
|
results.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.updateState(results[results.length - 1]);
|
this.updateState(results[results.length - 1]);
|
||||||
|
Reference in New Issue
Block a user