From 03a64986590f1f4779e698c404f8cc5b7f1836db Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sat, 9 Mar 2019 16:35:43 +0100 Subject: [PATCH] lib: import TextEncoder and TextDecoder from `internal/encoding` --- lib/internal/bootstrap/node.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index 83e1507441be28..c77d7cb0f08d8b 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -189,7 +189,9 @@ if (!config.noBrowserGlobals) { // https://url.spec.whatwg.org/#urlsearchparams exposeInterface(global, 'URLSearchParams', URLSearchParams); - const { TextEncoder, TextDecoder } = NativeModule.require('util'); + const { + TextEncoder, TextDecoder + } = NativeModule.require('internal/encoding'); // https://encoding.spec.whatwg.org/#textencoder exposeInterface(global, 'TextEncoder', TextEncoder); // https://encoding.spec.whatwg.org/#textdecoder