Skip to content

Commit f128008

Browse files
joyeecheungBridgeAR
authored andcommitted
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 1de9e13 commit f128008

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: lib/internal/bootstrap/node.js

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

195-
const { TextEncoder, TextDecoder } = NativeModule.require('util');
195+
const {
196+
TextEncoder, TextDecoder
197+
} = NativeModule.require('internal/encoding');
196198
// https://encoding.spec.whatwg.org/#textencoder
197199
exposeInterface(global, 'TextEncoder', TextEncoder);
198200
// https://encoding.spec.whatwg.org/#textdecoder

0 commit comments

Comments
 (0)