Skip to content

Commit ca29a3f

Browse files
committed
minor
1 parent 31ed55f commit ca29a3f

File tree

1 file changed

+20
-18
lines changed
  • services/static-webserver/client/source/class/osparc/data/model

1 file changed

+20
-18
lines changed

services/static-webserver/client/source/class/osparc/data/model/Node.js

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,26 +1351,28 @@ qx.Class.define("osparc.data.model.Node", {
13511351
this.self().ListenChangesProps.forEach(key => {
13521352
switch (key) {
13531353
case "inputs":
1354-
// listen to changes in the props form
1355-
this.getPropsForm().addListener("changeData", () => {
1356-
const data = this.__getInputData();
1357-
this.fireDataEvent("projectDocumentChanged", {
1358-
"op": "replace",
1359-
"path": `/workbench/${nodeId}/inputs`,
1360-
"value": data,
1361-
"osparc-resource": "node",
1354+
if (this.hasPropsForm()) {
1355+
// listen to changes in the props form
1356+
this.getPropsForm().addListener("changeData", () => {
1357+
const data = this.__getInputData();
1358+
this.fireDataEvent("projectDocumentChanged", {
1359+
"op": "replace",
1360+
"path": `/workbench/${nodeId}/inputs`,
1361+
"value": data,
1362+
"osparc-resource": "node",
1363+
});
13621364
});
1363-
});
1364-
// listen to changes in link and unlink of ports
1365-
this.getPropsForm().addListener("linkFieldModified", () => {
1366-
const data = this.__getInputData();
1367-
this.fireDataEvent("projectDocumentChanged", {
1368-
"op": "replace",
1369-
"path": `/workbench/${nodeId}/inputs`,
1370-
"value": data,
1371-
"osparc-resource": "node",
1365+
// listen to changes in link and unlink of ports
1366+
this.getPropsForm().addListener("linkFieldModified", () => {
1367+
const data = this.__getInputData();
1368+
this.fireDataEvent("projectDocumentChanged", {
1369+
"op": "replace",
1370+
"path": `/workbench/${nodeId}/inputs`,
1371+
"value": data,
1372+
"osparc-resource": "node",
1373+
});
13721374
});
1373-
});
1375+
}
13741376
break;
13751377
case "inputsUnits":
13761378
if (this.hasPropsForm()) {

0 commit comments

Comments
 (0)