Skip to content

Commit

Permalink
Fix bug not setting cached sequences ids (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
manulera authored Dec 6, 2024
1 parent 9939ef5 commit aba0fbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions src/store/cloning.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,18 @@ const reducer = {
}
const sourceId = getNextUniqueId(state);
const entityId = sourceId + 1;
sources.push({
const newEntity = {
...entity,
id: entityId,
};
const newSource = {
...source,
id: sourceId,
output: entityId,
});
entities.push({
...entity,
id: entityId,
});
state.teselaJsonCache[entityId] = convertToTeselaJson(entity);
};
entities.push(newEntity);
sources.push(newSource);
state.teselaJsonCache[entityId] = convertToTeselaJson(newEntity);
state.network = constructNetwork(state.entities, state.sources);
},

Expand Down

0 comments on commit aba0fbf

Please sign in to comment.