Quellcode durchsuchen

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

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan vor 3 Jahren
Ursprung
Commit
32b1070b0b
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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;