From 0273909a439ecbfb1e5c1044aee220becdfefe50 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 17 Jul 2024 15:42:49 +0200 Subject: [PATCH 1/2] Add comment on why we're adding a custom check --- src/vector/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vector/index.ts b/src/vector/index.ts index 2ac8b461db..f1fbff7339 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -75,6 +75,8 @@ function checkBrowserFeatures(): boolean { () => window.RegExp?.prototype && "unicodeSets" in window.RegExp.prototype, ); // ES2024: https://402.ecma-international.org/9.0/#sec-intl.segmenter + // The built-in modernizer 'intl' check only checks for te presence of the Intl object, not the Segmenter, + // and older Firefox has the former but not the latter, so we add our own. window.Modernizr.addTest("intlsegmenter", () => typeof window.Intl?.Segmenter === "function"); const featureList = Object.keys(window.Modernizr) as Array; From a32aca434cc8f27eaf77f0db08376fae9c699449 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 17 Jul 2024 15:30:01 +0100 Subject: [PATCH 2/2] Typo Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- src/vector/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/index.ts b/src/vector/index.ts index f1fbff7339..c86595a288 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -75,7 +75,7 @@ function checkBrowserFeatures(): boolean { () => window.RegExp?.prototype && "unicodeSets" in window.RegExp.prototype, ); // ES2024: https://402.ecma-international.org/9.0/#sec-intl.segmenter - // The built-in modernizer 'intl' check only checks for te presence of the Intl object, not the Segmenter, + // The built-in modernizer 'intl' check only checks for the presence of the Intl object, not the Segmenter, // and older Firefox has the former but not the latter, so we add our own. window.Modernizr.addTest("intlsegmenter", () => typeof window.Intl?.Segmenter === "function");