浏览代码

fix: modal listeners would not be deleted when closing a modal via closeModal instead of closeCurrentModal

Kristian Vos 3 年之前
父节点
当前提交
12da0056b1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      frontend/src/store/modules/modalVisibility.js

+ 1 - 0
frontend/src/store/modules/modalVisibility.js

@@ -83,6 +83,7 @@ const mutations = {
 	closeModal(state, modal) {
 		Object.entries(state.modals).forEach(([uuid, _modal]) => {
 			if (modal === _modal) {
+				ws.destroyModalListeners(uuid);
 				state.activeModals.splice(state.activeModals.indexOf(uuid), 1);
 				delete state.modals[uuid];
 			}