jitsi / js-utils

Utilities for Jitsi JS projects
Apache License 2.0
32 stars 60 forks source link

Electron detection crashes #29

Closed zeha closed 2 years ago

zeha commented 4 years ago

Hi,

when using Jitsi Meet in Ferdi 5.5 - based on Electron - the function _detectElectron in browser-detection/BrowserDetection.js crashes.

navigator.userAgent for this app is:

"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36 Ferdi/5.5.0 (Electron 8.2.3)"

The match attempt done by _detectElectron doesn't work:

userAgent.match(/Electron\/([\d.]+)/)
null

So the [1] array access fails with "Uncaught TypeError: Cannot read property '1' of null".

Jitsi Meet used to work with Ferdi 5.4.3, which I guess was based on an older Electron version.

Thanks, Chris

saghul commented 2 years ago

Fixed in https://github.com/jitsi/js-utils/pull/33