Skip to content

Add guard for Intl.Segmenter in line-text.ts, Fixes #159#164

Open
ArjunSrivastava1 wants to merge 1 commit intochenglou:mainfrom
ArjunSrivastava1:main
Open

Add guard for Intl.Segmenter in line-text.ts, Fixes #159#164
ArjunSrivastava1 wants to merge 1 commit intochenglou:mainfrom
ArjunSrivastava1:main

Conversation

@ArjunSrivastava1
Copy link
Copy Markdown

Fixes #159

  • Adds a runtime guard that throws an error message when Intl.Segmenter is unavailable, preventing from finding the issue deep in a render stack somewhere.
  • The error also consists of the site which lets the developers check if they are able to run the segmenter or not.
  • Further, this fix includes a comment that also mentions the reqs so code and explains so its clearer.

It was deemed unecessary to add the same in the readme as it felt bloated so that wasnt done

Warning

GitHub PR merge issues (since April 23, 2026).
A major issue is currently ongoing in github where the merge button is not working properly, confirmed since 23 April 2026, the issue is that merging leads to rolling back of commits, loss of history, and wrong merges which leads to loss of data
Be careful merging anything and always double check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intl.Segmenter hard dependency crashes on Firefox Mobile <125 without documentation or guard

1 participant