diff --git a/src/hooks/useOrderElement.ts b/src/hooks/useOrderElement.ts index 3f28761..6c1c85d 100644 --- a/src/hooks/useOrderElement.ts +++ b/src/hooks/useOrderElement.ts @@ -176,6 +176,8 @@ export default () => { else if(command === ElementOrderCommands.TOP) newElementList = moveTopElement(currentSlide.value.elements, element) else if(command === ElementOrderCommands.BOTTOM) newElementList = moveBottomElement(currentSlide.value.elements, element) + if(!newElementList) return + store.commit(MutationTypes.UPDATE_SLIDE, { elements: newElementList }) addHistorySnapshot() }