about summary refs log tree commit diff stats
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/console.nim2
-rw-r--r--src/js/jscolor.nim4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/js/console.nim b/src/js/console.nim
index 0de66162..2ea0fa91 100644
--- a/src/js/console.nim
+++ b/src/js/console.nim
@@ -35,7 +35,7 @@ proc clear(console: Console) {.jsfunc.} =
 proc debug(console: Console; ss: varargs[string]) {.jsfunc.} =
   console.log(ss)
 
-proc error(console: Console; ss: varargs[string]) {.jsfunc.} =
+proc error*(console: Console; ss: varargs[string]) {.jsfunc.} =
   console.log(ss)
 
 proc info(console: Console; ss: varargs[string]) {.jsfunc.} =
diff --git a/src/js/jscolor.nim b/src/js/jscolor.nim
index aa6fd8ed..8491e778 100644
--- a/src/js/jscolor.nim
+++ b/src/js/jscolor.nim
@@ -12,10 +12,10 @@ import utils/twtstr
 
 func parseLegacyColor*(s: string): JSResult[RGBColor] =
   if s == "":
-    return err(newTypeError("Color value must not be the empty string"))
+    return errTypeError("Color value must not be the empty string")
   let s = s.strip(chars = AsciiWhitespace).toLowerAscii()
   if s == "transparent":
-    return err(newTypeError("Color must not be transparent"))
+    return errTypeError("Color must not be transparent")
   return ok(parseLegacyColor0(s))
 
 proc toJS*(ctx: JSContext; rgb: RGBColor): JSValue =