Skip to content

Commit

Permalink
fix analytics for apple silicon
Browse files Browse the repository at this point in the history
allow os.cpus() to be an empty array
  • Loading branch information
audionerd committed Feb 16, 2021
1 parent eaebb72 commit 642e8f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ const init = shouldEnable => {
cd4: os.release(),
cd5: os.totalmem(),
cd6: os.cpus().length,
cd7: os.cpus()[0].speed,
// Apple Silicon does not report os.cpus() in Electron 11
cd7: os.cpus()[0]?.speed,
}, uuid)
.catch(_handleError)
})
Expand Down

0 comments on commit 642e8f0

Please sign in to comment.