Browse Source

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

Kristian Vos 3 years ago
parent
commit
12da0056b1
1 changed files with 1 additions and 0 deletions
  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];
 			}