fix(device): fix IpcRenderer empty data messages (#503)
* fix(device): fix IpcRenderer empty data messages If IpcRenderer send null / undefined data as argument then IpcMain parse it as empty array and not a NULL object * fix else line break
This commit is contained in:
committed by
László Monda
parent
95d1d7f8b5
commit
58b1b9b1dc
@@ -35,7 +35,11 @@ export class DeviceRendererService {
|
||||
}
|
||||
|
||||
updateFirmware(data?: Array<number>): void {
|
||||
this.ipcRenderer.send(IpcEvents.device.updateFirmware, JSON.stringify(data));
|
||||
if (data) {
|
||||
this.ipcRenderer.send(IpcEvents.device.updateFirmware, JSON.stringify(data));
|
||||
} else {
|
||||
this.ipcRenderer.send(IpcEvents.device.updateFirmware);
|
||||
}
|
||||
}
|
||||
|
||||
startConnectionPoller(): void {
|
||||
|
||||
Reference in New Issue
Block a user