Skip to content

Commit

Permalink
chore: early return setDom
Browse files Browse the repository at this point in the history
  • Loading branch information
prevwong committed Jan 4, 2021
1 parent 32f971b commit 5443af9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/editor/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,10 @@ const Methods = (
* @param dom
*/
setDOM(id: NodeId, dom: HTMLElement) {
invariant(state.nodes[id], ERROR_INVALID_NODEID);
if (!state.nodes[id]) {
return;
}

state.nodes[id].dom = dom;
},

Expand Down

0 comments on commit 5443af9

Please sign in to comment.