Fix platform detection

This commit is contained in:
Scott E. Graves
2019-04-17 21:35:52 -05:00
parent 402968e918
commit 600c81acce
3 changed files with 9 additions and 6 deletions

View File

@@ -617,17 +617,20 @@ ipcMain.on(Constants.IPC_Get_Platform, (event) => {
.then(data => {
platform = data.replace(/(\r\n|\n|\r)/gm,"");
event.sender.send(Constants.IPC_Get_Platform_Reply, {
data: platform,
OSPlatform: os.platform(),
Platform: platform,
});
})
.catch(() => {
event.sender.send(Constants.IPC_Get_Platform_Reply, {
data: platform,
OSPlatform: os.platform(),
Platform: platform,
});
});
} else {
event.sender.send(Constants.IPC_Get_Platform_Reply, {
data: platform,
OSPlatform: os.platform(),
Platform: platform,
});
}
});