Skip to content

Commit 92012d2

Browse files
authored
fix: utf16toStringLoose(Uint16Array) on BE hardware (#44)
1 parent 09878c7 commit 92012d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utf16.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const decoderLooseLE = canDecoders ? new TextDecoder('utf-16le', { ignoreBOM })
88
const decoderFatalBE = canDecoders ? new TextDecoder('utf-16be', { ignoreBOM, fatal: true }) : null
99
const decoderLooseBE = canDecoders ? new TextDecoder('utf-16be', { ignoreBOM }) : null
1010
const decoderFatal16 = isLE ? decoderFatalLE : decoderFatalBE
11-
const decoderLoose16 = isLE ? decoderLooseLE : decoderFatalBE
11+
const decoderLoose16 = isLE ? decoderLooseLE : decoderLooseBE
1212
const { isWellFormed, toWellFormed } = String.prototype
1313

1414
const { E_STRICT, E_STRICT_UNICODE } = js

0 commit comments

Comments
 (0)