Skip to content

Commit

Permalink
Merge pull request #133 from VictorS67/encre-ui-dev-fix-duplicated-node
Browse files Browse the repository at this point in the history
Encre UI dev Fix Duplicated Node Port Id (Issue #132)
  • Loading branch information
VictorS67 authored Sep 23, 2024
2 parents 66d0fe5 + 78cd0a6 commit f6e00c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/app/src/state/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ export const updateNodeIODefState = selector<{
set: ({ set, get }, newVal) => {
if (newVal instanceof DefaultValue) return;
const id: RecordId = newVal.id;
const io = newVal.io;
const io = {
inputDefs: newVal.io.inputDefs.map((i: NodeInputPortDef) => ({ ...i, nodeId: id})),

Check failure on line 195 in packages/app/src/state/node.ts

View workflow job for this annotation

GitHub Actions / Check linting

Replace `·...i,·nodeId:·id` with `⏎········...i,⏎········nodeId:·id,⏎······`

Check failure on line 195 in packages/app/src/state/node.ts

View workflow job for this annotation

GitHub Actions / Check linting

A space is required before '}'

Check failure on line 195 in packages/app/src/state/node.ts

View workflow job for this annotation

GitHub Actions / Check linting

Replace `·...i,·nodeId:·id` with `⏎········...i,⏎········nodeId:·id,⏎······`

Check failure on line 195 in packages/app/src/state/node.ts

View workflow job for this annotation

GitHub Actions / Check linting

A space is required before '}'
outputDefs: newVal.io.outputDefs.map((o: NodeOutputPortDef) => ({ ...o, nodeId: id})),

Check failure on line 196 in packages/app/src/state/node.ts

View workflow job for this annotation

GitHub Actions / Check linting

Replace `·...o,·nodeId:·id` with `⏎········...o,⏎········nodeId:·id,⏎······`

Check failure on line 196 in packages/app/src/state/node.ts

View workflow job for this annotation

GitHub Actions / Check linting

A space is required before '}'

Check failure on line 196 in packages/app/src/state/node.ts

View workflow job for this annotation

GitHub Actions / Check linting

Replace `·...o,·nodeId:·id` with `⏎········...o,⏎········nodeId:·id,⏎······`

Check failure on line 196 in packages/app/src/state/node.ts

View workflow job for this annotation

GitHub Actions / Check linting

A space is required before '}'
};

const currMap = get(nodeIODefState);
const updatedMap = { ...currMap, [id]: io };
Expand Down

0 comments on commit f6e00c0

Please sign in to comment.