From a26f1502aa16d6fa9abee2b6a408252e756363ad Mon Sep 17 00:00:00 2001 From: Vaclav Lunak Date: Mon, 5 Dec 2022 10:51:16 +0100 Subject: [PATCH] remove deprecated library call --- modules/cr.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cr.ts b/modules/cr.ts index 1b667ec..883313d 100644 --- a/modules/cr.ts +++ b/modules/cr.ts @@ -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);