diff options
author | bptato <nincsnevem662@gmail.com> | 2024-06-22 23:37:11 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-06-22 23:37:11 +0200 |
commit | ddffd4502dad948121244cddc4847250d7a87d40 (patch) | |
tree | a7afdd78aed46b64eb9a8cbb26bfc00475b5e9b7 /src/js | |
parent | c0fc92b7e4e328259404c46d2bc604b38d6087b4 (diff) | |
download | chawan-ddffd4502dad948121244cddc4847250d7a87d40.tar.gz |
Update monoucha
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/base64.nim | 2 | ||||
-rw-r--r-- | src/js/encoding.nim | 2 |
2 files changed, 2 insertions, 2 deletions
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, |