mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-25 07:47:18 +00:00
Don't pass undefined sockets to ipc.server.emit()
Changelog-entry: Don't pass undefined sockets to ipc.server.emit() Change-type: patch
This commit is contained in:
parent
5299d958f2
commit
dd583a176f
@ -392,7 +392,10 @@ exports.cancel = () => {
|
||||
|
||||
try {
|
||||
const [ socket ] = ipc.server.sockets
|
||||
ipc.server.emit(socket, 'cancel')
|
||||
// eslint-disable-next-line no-undefined
|
||||
if (socket !== undefined) {
|
||||
ipc.server.emit(socket, 'cancel')
|
||||
}
|
||||
} catch (error) {
|
||||
analytics.logException(error)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user