diff options
author | Michael Keller <github@ike.ch> | 2018-08-15 13:09:26 +0300 |
---|---|---|
committer | mikeller <github@ike.ch> | 2018-08-15 13:18:50 +0300 |
commit | b8399874116d4eae5ee7d456862628766b546869 (patch) | |
tree | 825149485d58f9b911b5b6a7202cf59faa6d21b9 | |
parent | f017488d745b33c6909c1275e9b0b7570c501fe2 (diff) |
Merge pull request #1168 from mikeller/fix_chromeos_version10.4.110.4.x-maintenance
Fixed bug in chrome web app version.
-rw-r--r-- | src/js/main.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js/main.js b/src/js/main.js index e841b178..a03d1010 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -46,7 +46,7 @@ function setupAnalytics(result, gitChangesetId) { var optOut = !!result.analyticsOptOut; var checkForDebugVersions = !!result.checkForConfiguratorUnstableVersions; - var debugMode = process.versions['nw-flavor'] === 'sdk'; + var debugMode = typeof process === "object" && process.versions['nw-flavor'] === 'sdk'; analytics = new Analytics('UA-123002063-1', userId, 'Betaflight Configurator', getManifestVersion(), gitChangesetId, GUI.operating_system, checkForDebugVersions, optOut, debugMode); @@ -54,7 +54,9 @@ function setupAnalytics(result, gitChangesetId) { analytics.sendException(exception.stack); } - process.on('uncaughtException', logException); + if (typeof process === "object") { + process.on('uncaughtException', logException); + } analytics.sendEvent(analytics.EVENT_CATEGORIES.APPLICATION, 'AppStart', { sessionControl: 'start' }); |