Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#7456): allow children of Overlay Plots to be removed #7516

Merged
merged 7 commits into from
Feb 22, 2024
Merged
Next Next commit
fix(#7456): check if object is an identifier
  • Loading branch information
ozyx committed Feb 21, 2024
commit 40bff181764c74d8c8f364b834723e21ccbbd48d
6 changes: 5 additions & 1 deletion src/ui/mixins/staleness-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import { isProxy, toRaw } from 'vue';

import { isIdentifier } from '@/api/objects/object-utils';
import StalenessUtils from '@/utils/staleness';

export default {
Expand All @@ -40,7 +41,9 @@ export default {
},
methods: {
getSubscriptionId(domainObject) {
return this.openmct?.objects.makeKeyString(domainObject.identifier);
// Only extract the identifier if it is not already an identifier
const identifier = isIdentifier(domainObject) ? domainObject : domainObject.identifier;
return this.openmct?.objects.makeKeyString(identifier);
},
setupClockChangedEvent(callback) {
this.setupClockChanged = true;
Expand Down Expand Up @@ -97,6 +100,7 @@ export default {
if (isProxy(domainObject)) {
domainObject = toRaw(domainObject);
}

const id = this.getSubscriptionId(domainObject);
if (!this.stalenessSubscription[id]) {
return;
Expand Down