Don't send events after window is gone
This commit is contained in:
@@ -28,9 +28,11 @@ class IpcMainEventBus implements EventBusInterface {
|
||||
}
|
||||
|
||||
public emit<MessageType>(event: Event<MessageType>, msg: MessageType) {
|
||||
if (!this.client.isDestroyed()) {
|
||||
this.client.send(event.topic, msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class IpcRendererEventBus implements EventBusInterface {
|
||||
private ipc: IpcRenderer
|
||||
|
||||
Reference in New Issue
Block a user