Skip to content
Permalink
Browse files

Fix sporadic crashing on macOS catalina beta

  • Loading branch information...
Thomas101 committed Jul 11, 2019
1 parent 57c0d88 commit 8f4e716a83cec50558034cacb56104b425fccf17
Showing with 20 additions and 1 deletion.
  1. +5 −1 src/shared/Models/Settings/AppSettings.js
  2. +15 −0 src/shared/Platform.js
@@ -30,7 +30,11 @@ class AppSettings extends Model {
/* **************************************************************************/

static get UPDATE_CHANNELS () { return RELEASE_CHANNELS }
static get SUPPORTS_MIXED_SANDBOX_MODE () { return true }
static get SUPPORTS_MIXED_SANDBOX_MODE () {
// Dynamic require so guest pages don't bork
const Platform = require('../../Platform').default
return Platform.isDarwinCatalina() === false
}
static get SEARCH_PROVIDERS () { return SEARCH_PROVIDERS }
static get SEARCH_PROVIDER_NAMES () { return SEARCH_PROVIDER_NAMES }
static get PROXY_MODES () { return PROXY_MODES }
@@ -35,6 +35,21 @@ class Platform {
}
return false
}

/**
* Checks if we are macOS catalina
* @return true if we are catalina, false otherwise
*/
static isDarwinCatalina () {
if (process.platform === 'darwin') {
try {
return semver.satisfies(os.release(), '19.x.x') // catalina lists itself as 19.0.0
} catch (ex) {
return false
}
}
return false
}
}

export default Platform

0 comments on commit 8f4e716

Please sign in to comment.
You can’t perform that action at this time.