Fix platform detection

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

No files matched your search

+6 -3
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,
});
}
});