Browse Source

fix(WS): modal listeners wouldn't get deleted properly due to new modal system

Kristian Vos 3 years ago
parent
commit
18386cd410
1 changed files with 2 additions and 2 deletions
  1. 2 2
      frontend/src/ws.js

+ 2 - 2
frontend/src/ws.js

@@ -52,11 +52,11 @@ export default {
 		});
 	},
 
-	destroyModalListeners(modal) {
+	destroyModalListeners(modalUuid) {
 		// destroy all listeners for a specific modal
 		Object.keys(this.socket.dispatcher.listeners).forEach(type =>
 			this.socket.dispatcher.listeners[type].forEach((element, index) => {
-				if (element.options && element.options.modal === modal)
+				if (element.options && element.options.modalUuid === modalUuid)
 					this.socket.dispatcher.listeners[type].splice(index, 1);
 			})
 		);