Update skooma.js to handle numbers
This commit is contained in:
parent
63a85b7570
commit
0448cd2742
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
const parseAttribute = (attribute) => {
|
||||
if (typeof(attribute) == "string")
|
||||
if (typeof attribute == "string" || typeof attribute == "number")
|
||||
return attribute
|
||||
else if ("join" in attribute)
|
||||
return attribute.join(" ")
|
||||
|
@ -10,7 +10,7 @@ const parseAttribute = (attribute) => {
|
|||
const parseArgs = (element, args) => {
|
||||
if (element.content) element = element.content
|
||||
for (let arg of args)
|
||||
if (typeof(arg) == "string")
|
||||
if (typeof arg == "string" || typeof arg == "number")
|
||||
element.appendChild(document.createTextNode(arg))
|
||||
else if ("nodeName" in arg)
|
||||
element.appendChild(arg)
|
||||
|
|
Loading…
Reference in a new issue