From ddffd4502dad948121244cddc4847250d7a87d40 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 22 Jun 2024 23:37:11 +0200 Subject: Update monoucha --- src/js/base64.nim | 2 +- src/js/encoding.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/js') diff --git a/src/js/base64.nim b/src/js/base64.nim index b6941ef6..c44fb5f6 100644 --- a/src/js/base64.nim +++ b/src/js/base64.nim @@ -12,7 +12,7 @@ proc atob*(data: string): DOMResult[NarrowString] = # Note: the actual atob implementation (atob0) is in twtstr. let r = atob0(data) if r.isNone: - return err(newDOMException(r.error, "InvalidCharacterError")) + return errDOMException(r.error, "InvalidCharacterError") return ok(NarrowString(r.get)) const AMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" diff --git a/src/js/encoding.nim b/src/js/encoding.nim index 6c32ee3c..e17fc652 100644 --- a/src/js/encoding.nim +++ b/src/js/encoding.nim @@ -29,7 +29,7 @@ func newJSTextDecoder(label = "utf-8", options = TextDecoderOptions()): JSResult[JSTextDecoder] {.jsctor.} = let encoding = getCharset(label) if encoding in {CHARSET_UNKNOWN, CHARSET_REPLACEMENT}: - return err(newRangeError("Invalid encoding label")) + return errRangeError("Invalid encoding label") return ok(JSTextDecoder( ignoreBOM: options.ignoreBOM, fatal: options.fatal, -- cgit 1.4.1-2-gfad0