mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-20 09:46:31 +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 {
|
try {
|
||||||
const [ socket ] = ipc.server.sockets
|
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) {
|
} catch (error) {
|
||||||
analytics.logException(error)
|
analytics.logException(error)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user