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

@@ -11,12 +11,12 @@ if (!process.versions.hasOwnProperty('electron')) {
const ipcRenderer = ((window && window.require) ? window.require('electron').ipcRenderer : null);
if (ipcRenderer) {
ipcRenderer.on(Constants.IPC_Get_Platform_Reply, (event, arg) => {
if (arg.data === 'linux') {
if (arg.OSPlatform === 'linux') {
let root = document.documentElement;
root.style.setProperty('--default_font_size', '4.8vmin');
}
ReactDOM.render(<App platform={arg.data} version={packageJson.version}/>, document.getElementById('root'));
ReactDOM.render(<App platform={arg.Platform} version={packageJson.version}/>, document.getElementById('root'));
serviceWorker.unregister();
});
ipcRenderer.send(Constants.IPC_Get_Platform);