Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ext/web): Don't rely on NaN comparisons in `TextEncoderStrea…
…m` (#13151) In the `transform` function to `TextEncoderStream`'s internal `TransformStream`, if `chunk` is the empty string and `this.#pendingHighSurrogate` is null, then `lastCodeUnit` will be NaN. As it turns out, this does not cause a bug because the comparison to check for lone surrogates turns out to be false for NaN, but to rely on it makes the code brittle.
- Loading branch information