Improve skooma warning on undefined arguments
This commit is contained in:
parent
bef3fc5c31
commit
233a96d0e0
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue