Fix error when breadcrumb image fails to load (#609)

This commit is contained in:
Michael Telatynski
2023-04-05 11:56:12 +01:00
committed by GitHub
parent 224bccaf95
commit 8b16f2d0d9

View File

@@ -220,7 +220,8 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) {
return resp.arrayBuffer();
})
.then((arrayBuffer) => {
const buffer = Buffer.from(arrayBuffer!);
if (!arrayBuffer) return;
const buffer = Buffer.from(arrayBuffer);
button.icon = nativeImage.createFromBuffer(buffer);
button.label = "";
button.backgroundColor = "";