forked from opentiny/tiny-engine
fix(canvas): fix del key error when nothing is selected (#69)
This commit is contained in:
parent
d1f0a35950
commit
da0fbd1e28
|
@ -205,6 +205,10 @@ export const removeNode = ({ parent, node }) => {
|
|||
}
|
||||
|
||||
export const removeNodeById = (id) => {
|
||||
if (!id) {
|
||||
return
|
||||
}
|
||||
|
||||
removeNode(getNode(id, true))
|
||||
clearSelect()
|
||||
getController().addHistory()
|
||||
|
|
Loading…
Reference in New Issue