Skip to content

Commit

Permalink
Add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadorequest committed Feb 4, 2021
1 parent 746f3e6 commit bae5192
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/PlaygroundContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const PlaygroundContainer: React.FunctionComponent<Props> = (props): JSX.Element
const id = node.id;

const updateCurrentNode = (nodeData: Partial<BaseNodeData>): void => {
console.log('Updating current node with', nodeData);
const nodeToUpdateIndex = nodes.findIndex((node: BaseNodeData) => node.id === id);
console.log('updateCurrentNode nodeToUpdateIndex', nodeToUpdateIndex);
const nodeToUpdate = {
Expand All @@ -105,7 +106,7 @@ const PlaygroundContainer: React.FunctionComponent<Props> = (props): JSX.Element
console.log('updateCurrentNode updated node', nodeToUpdate);

const newNodes = nodes;
newNodes[nodeToUpdateIndex] = nodeToUpdate
newNodes[nodeToUpdateIndex] = nodeToUpdate;
console.log('updateCurrentNode new nodes', newNodes);

setNodes(newNodes);
Expand Down

0 comments on commit bae5192

Please sign in to comment.