[Snapshots] Are holding on to outdated domainObjects when clicking on preview #3078 (#3240)

* [Snapshots] Are holding on to outdated domainObjects when clicking on preview #3078

* #3250 :  [Preview] Preview window should not have any context menu actions

* cleanup: removed redundant code
This commit is contained in:
Nikhil
2020-07-29 16:33:39 -07:00
committed by GitHub
parent e667b22b3c
commit 573a63d359
3 changed files with 4 additions and 22 deletions

View File

@ -248,7 +248,8 @@ export default {
previewEmbed() {
const self = this;
const previewAction = new PreviewAction(self.openmct);
previewAction.invoke(JSON.parse(self.embed.objectPath));
this.openmct.objects.get(self.embed.domainObject.identifier)
.then(domainObject => previewAction.invoke([domainObject]));
},
removeEmbed(success) {
if (!success) {

View File

@ -95,8 +95,7 @@ export const createNewEmbed = (snapshotMeta, snapshot = '') => {
id: 'embed-' + date,
name,
snapshot,
type,
objectPath: JSON.stringify(objectPath)
type
};
}