Skip to content

Commit

Permalink
check node still exists
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Nov 18, 2024
1 parent 7ec1d25 commit c2058db
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -752,13 +752,15 @@ qx.Class.define("osparc.desktop.WorkbenchView", {
__iFrameChanged: function(node) {
this.__iframePage.removeAll();

const loadingPage = node.getLoadingPage();
const iFrame = node.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this.__iframePage.add(iFrameView, {
flex: 1
});
if (node) {
const loadingPage = node.getLoadingPage();
const iFrame = node.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this.__iframePage.add(iFrameView, {
flex: 1
});
}
},

__populateSecondaryColumn: function(node) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,15 @@ qx.Class.define("osparc.node.slideshow.NodeView", {
this._iFrameLayout.removeAll();

const node = this.getNode();

const loadingPage = node.getLoadingPage();
const iFrame = node.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this._iFrameLayout.add(iFrameView, {
flex: 1
});
if (node) {
const loadingPage = node.getLoadingPage();
const iFrame = node.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this._iFrameLayout.add(iFrameView, {
flex: 1
});
}
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,16 @@ qx.Class.define("osparc.viewer.NodeViewer", {
__iFrameChanged: function() {
this._removeAll();

const iframeHandler = this.getNode().getIframeHandler();

const loadingPage = iframeHandler.getLoadingPage();
const iFrame = iframeHandler.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this._add(iFrameView, {
flex: 1
});
if (this.getNode() && this.getNode().getIframeHandler()) {
const iframeHandler = this.getNode().getIframeHandler();
const loadingPage = iframeHandler.getLoadingPage();
const iFrame = iframeHandler.getIFrame();
const src = iFrame.getSource();
const iFrameView = (src === null || src === "about:blank") ? loadingPage : iFrame;
this._add(iFrameView, {
flex: 1
});
}
},

__attachSocketEventHandlers: function() {
Expand Down

0 comments on commit c2058db

Please sign in to comment.