Skip to content

Commit aff31b3

Browse files
committed
fix: perf regression
From an invalid clause in 7a4347e
1 parent 7d82bcf commit aff31b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fallback/_utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export const nativeDecoder = isNative(TextDecoder)
1717
// Actually windows-1252, compatible with ascii and latin1 decoding
1818
// Beware that on non-latin1, i.e. on windows-1252, this is broken in ~all Node.js versions released
1919
// in 2025 due to a regression, so we call it Latin1 as it's usable only for that
20-
const getNativeLain1 = () => {
20+
const getNativeLatin1 = () => {
2121
// Not all barebone engines with TextDecoder support something except utf-8, detect
22-
if (!nativeDecoder) {
22+
if (nativeDecoder) {
2323
try {
2424
return new TextDecoder('latin1', { ignoreBOM: true })
2525
} catch {}
@@ -28,7 +28,7 @@ const getNativeLain1 = () => {
2828
return null
2929
}
3030

31-
export const nativeDecoderLatin1 = /* @__PURE__ */ getNativeLain1()
31+
export const nativeDecoderLatin1 = /* @__PURE__ */ getNativeLatin1()
3232
export const canDecoders = !!nativeDecoderLatin1
3333

3434
// Block Firefox < 146 specifically from using native hex/base64, as it's very slow there

0 commit comments

Comments
 (0)