Skip to content

Commit c9a1cbc

Browse files
committed
refactor: using object destructuring in shims
1 parent 6e47028 commit c9a1cbc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

shim.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ if (typeof localStorage !== 'undefined') {
2727
// crypto is loaded first, so it can populate global.crypto
2828
require('crypto')
2929

30-
const TextEncoder = require('text-encoding').TextEncoder;
31-
const TextDecoder = require('text-encoding').TextDecoder;
30+
const { TextEncoder, TextDecoder } = require('text-encoding');
3231

3332
global.TextDecoder = TextDecoder;
3433
global.TextEncoder = TextEncoder;

0 commit comments

Comments
 (0)