You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
make sure the check doesn't blow up
This commit is contained in:
committed by
J. Ryan Stinnett
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user