Skip to content

Commit

Permalink
fix: verify operations copy id
Browse files Browse the repository at this point in the history
  • Loading branch information
gargameljyh committed Nov 25, 2023
1 parent e3ba869 commit 99db94b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/canvas/src/components/container/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@ export const addComponent = (data, position) => {
}

export const copyNode = (id) => {
if (!id) {
return
}
const { node, parent } = getNode(id, true)

Check failure on line 255 in packages/canvas/src/components/container/container.js

View workflow job for this annotation

GitHub Actions / push-check

'getNode' was used before it was defined

inserAfter({ parent, node, data: copyObject(node) })
Expand Down

0 comments on commit 99db94b

Please sign in to comment.