Skip to content

Commit

Permalink
TextEncoder and TextDecoder constructors do not require arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorm committed Jun 2, 2024
1 parent 4e2d693 commit 303a015
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal/encoding/utf8.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { globalScope } from "../global-scope.js";
* TextEncoder instance.
* @type {TextEncoder|null}
*/
const ENCODER = globalScope.TextEncoder ? new globalScope.TextEncoder("utf-8") : null;
const ENCODER = globalScope.TextEncoder ? new globalScope.TextEncoder() : null;

/**
* TextDecoder instance.
* @type {TextDecoder|null}
*/
const DECODER = globalScope.TextDecoder ? new globalScope.TextDecoder("utf-8") : null;
const DECODER = globalScope.TextDecoder ? new globalScope.TextDecoder() : null;

/**
* Converts an UTF-8 string to an Uint8Array.
Expand Down

0 comments on commit 303a015

Please sign in to comment.