Explorar o código

fix(modals): pscrolling wasn't being re-enabled in some situations when closing modals

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan %!s(int64=3) %!d(string=hai) anos
pai
achega
32b1070b0b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      frontend/src/store/modules/modalVisibility.js

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

@@ -45,6 +45,7 @@ const actions = {
 const mutations = {
 	closeModal(state, modal) {
 		state.modals[modal] = false;
+		if (state.currentlyActive[0] === modal) state.currentlyActive.shift();
 	},
 	openModal(state, modal) {
 		state.modals[modal] = true;
@@ -52,7 +53,6 @@ const mutations = {
 	},
 	closeCurrentModal(state) {
 		// remove any websocket listeners for the modal
-		console.log(`Closing current modal (${state.currentlyActive[0]})`);
 		ws.destroyModalListeners(state.currentlyActive[0]);
 
 		state.modals[state.currentlyActive[0]] = false;