Skip to content

Commit

Permalink
fix: don't fail if element doesn't exist on removal
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Apr 12, 2024
1 parent 8777320 commit 1ac1ad1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AutoFrameComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const CopyHostStyles = ({

const elHash = hash(el.outerHTML);

elements[index].mirror.remove();
elements[index]?.mirror?.remove();
delete hashes[elHash];

if (debug) console.log(`Removed style node ${el.outerHTML}`);
Expand Down

0 comments on commit 1ac1ad1

Please sign in to comment.