mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-01-22 15:08:12 -05:00
Silence port disconnected errors. Fix #1587.
This commit is contained in:
parent
961cdadc8d
commit
2bcd7e633c
@ -10,7 +10,11 @@ module.exports = class ChromePort
|
||||
@sender = @port.sender
|
||||
|
||||
@disconnect = @port.disconnect.bind(@port)
|
||||
@postMessage = @port.postMessage.bind(@port)
|
||||
@postMessage = (args...) =>
|
||||
try
|
||||
@port.postMessage(args...)
|
||||
catch
|
||||
return
|
||||
|
||||
@onMessage = new TrackedEvent(@port.onMessage)
|
||||
@onDisconnect = new TrackedEvent(@port.onDisconnect)
|
||||
|
Loading…
Reference in New Issue
Block a user