Browse Source

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

Kristian Vos 3 năm trước cách đây
mục cha
commit
18386cd410
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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);
 			})
 		);