From 5145857bb0ef1bc0e8df8cef982ff83cf4791edf Mon Sep 17 00:00:00 2001 From: pipipi-pikachu <1171051090@qq.com> Date: Mon, 25 Jan 2021 23:12:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A1=B6=E5=B1=82=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E7=BD=AE=E9=A1=B6=E5=B1=82=E5=87=BA=E9=94=99=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useOrderElement.ts | 2 ++ 1 file changed, 2 insertions(+) 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() }