Skip to content

Commit

Permalink
Merge pull request #185 from lunakv/buffer-deprecation
Browse files Browse the repository at this point in the history
Remove deprecated call to Response.buffer()
  • Loading branch information
multimeric authored Dec 5, 2022
2 parents 5df4dc8 + a26f150 commit 43c58be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/cr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export default class CR {
async init() {
try {
const res = await fetch(CR_ADDRESS);
const buff = await res.buffer();
this.parseCr(iconv.decode(buff, "utf-16"));
const buff = await res.arrayBuffer();
this.parseCr(iconv.decode(Buffer.from(buff), "utf-16"));
this.buildSuggestions();
} catch (err) {
log.error("Error loading CR: " + err);
Expand Down

0 comments on commit 43c58be

Please sign in to comment.