Improve skooma warning on undefined arguments

This commit is contained in:
Talia 2023-03-01 11:01:49 +01:00
parent 4128cb53aa
commit 77af61fc45
Signed by: darkwiiplayer
GPG key ID: 7808674088232B3E

View file

@ -50,7 +50,7 @@ const parseArgs = (element, before, ...args) => {
if (typeof arg == "string" || typeof arg == "number") if (typeof arg == "string" || typeof arg == "number")
element.insertBefore(document.createTextNode(arg), before) element.insertBefore(document.createTextNode(arg), before)
else if (arg === undefined || arg == null) else if (arg === undefined || arg == null)
console.warn(`Argument is ${typeof arg}`, element) console.warn(`An argument of type ${typeof arg} has been ignored`, element)
else if (typeof arg == "function") else if (typeof arg == "function")
arg(element) arg(element)
else if ("nodeName" in arg) else if ("nodeName" in arg)