Skip to content

Commit 4562697

Browse files
committed
lib: import TextEncoder and TextDecoder from internal/encoding
PR-URL: #26547 Refs: #26546 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 7ac904e commit 4562697

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/internal/bootstrap/node.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ if (!config.noBrowserGlobals) {
189189
// https://url.spec.whatwg.org/#urlsearchparams
190190
exposeInterface(global, 'URLSearchParams', URLSearchParams);
191191

192-
const { TextEncoder, TextDecoder } = NativeModule.require('util');
192+
const {
193+
TextEncoder, TextDecoder
194+
} = NativeModule.require('internal/encoding');
193195
// https://encoding.spec.whatwg.org/#textencoder
194196
exposeInterface(global, 'TextEncoder', TextEncoder);
195197
// https://encoding.spec.whatwg.org/#textdecoder

0 commit comments

Comments
 (0)