mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
fix: handle frontend error
This commit is contained in:
1 parent
ca057a657b
commit
9193b9518a
1 file changed
+4
@@ -42,6 +42,10 @@ class SocketWrapper {
|
||||
}
|
||||
|
||||
emit(event, data) {
|
||||
if (!this.socket) {
|
||||
console.warn('Socket is not connected!')
|
||||
return
|
||||
}
|
||||
this.socket.emit(event, data)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user