Fix platform detection
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user