Browse Source

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

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 3 years ago
parent
commit
32b1070b0b
1 changed files with 1 additions and 1 deletions
  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;