mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-25 08:21:41 +02:00
make sure the check doesn't blow up
This commit is contained in:
parent
43f642a8fe
commit
ced55552da
@ -22,6 +22,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
function safariVersionCheck(ua) {
|
||||
try {
|
||||
const safariVersionMatch = ua.match(/Mac OS X ([\d|_]+).*Version\/([\d|\.]+) Safari/);
|
||||
if (safariVersionMatch) {
|
||||
const macOSVersionStr = safariVersionMatch[1];
|
||||
@ -35,6 +36,9 @@ function safariVersionCheck(ua) {
|
||||
`supported: ${colrFontSupported}`);
|
||||
return colrFontSupported;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("Couldn't determine Safari version to check COLR font support, assuming no.", err);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user