aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gleam_stdlib.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gleam_stdlib.mjs b/src/gleam_stdlib.mjs
index 19a43b1..35d2f7d 100644
--- a/src/gleam_stdlib.mjs
+++ b/src/gleam_stdlib.mjs
@@ -156,7 +156,7 @@ export function graphemes(string) {
}
function graphemes_iterator(string) {
- if (Intl && Intl.Segmenter) {
+ if (typeof Intl !== 'undefined' && Intl.Segmenter) {
return new Intl.Segmenter().segment(string)[Symbol.iterator]();
}
}