Improve skooma warning on undefined arguments

This commit is contained in:
Talia 2023-03-01 11:01:49 +01:00
parent bef3fc5c31
commit 233a96d0e0
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ const parseArgs = (element, before, ...args) => {
if (typeof arg == "string" || typeof arg == "number")
element.insertBefore(document.createTextNode(arg), before)
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")
arg(element)
else if ("nodeName" in arg)