mirror of
https://github.com/nasa/openmct.git
synced 2025-04-12 05:40:17 +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:
parent
b7fa5c7ba8
commit
40d54df567
src/plugins/summaryWidget/src
@ -237,6 +237,7 @@ define ([
|
||||
});
|
||||
delete this.compositionObjs[objectId];
|
||||
this.subscriptions[objectId](); //unsubscribe from telemetry source
|
||||
delete this.subscriptions[objectId];
|
||||
this.eventEmitter.emit('remove', identifier);
|
||||
|
||||
if (_.isEmpty(this.compositionObjs)) {
|
||||
|
@ -43,7 +43,7 @@ define([
|
||||
return evaluator.requestLatest(options)
|
||||
.then(function (latestDatum) {
|
||||
this.pool.release(evaluator);
|
||||
return [latestDatum];
|
||||
return latestDatum ? [latestDatum] : [];
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
|
@ -52,7 +52,10 @@ define([
|
||||
strategy: 'latest',
|
||||
size: 1
|
||||
}).then(function (results) {
|
||||
if (this.destroyed || this.hasUpdated || this.renderTracker !== renderTracker) {
|
||||
if (this.destroyed ||
|
||||
this.hasUpdated ||
|
||||
this.renderTracker !== renderTracker ||
|
||||
results.length === 0) {
|
||||
return;
|
||||
}
|
||||
this.updateState(results[results.length - 1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user