Skip to content

Commit

Permalink
fix(minor): fix error deleting element
Browse files Browse the repository at this point in the history
In production, mutation.events is undefined which causes error while deleting element.
  • Loading branch information
maharshivpatel committed Sep 30, 2024
1 parent 7d82add commit e59930f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const getMarginContainerStyle = computed(() => {
onMounted(() => {
// TODO: Refactor this as per the new store structure
ElementStore.$subscribe((mutation, state) => {
if (!(mutation?.events)) return;
if (
(mutation.events.type === "set" && mutation.events.key == "Elements") ||
(mutation.events.type === "add" && mutation.events.newValue.parent?.type == "page")
Expand Down

0 comments on commit e59930f

Please sign in to comment.