kopia lustrzana https://github.com/badgen/badgen
fix: TypeError when running astral on empty string
rodzic
6d70dd372e
commit
dd99690c25
|
@ -7,7 +7,7 @@ function calcWidth (charWidthTable) {
|
|||
widthTable[64] = widthTable[64] + 6 // Slightly increase width of "@" by 0.6px
|
||||
|
||||
return function (text, astral) {
|
||||
if (astral) text = text.match(astralRegex)
|
||||
if (astral) text = text.match(astralRegex) || []
|
||||
|
||||
let total = 0
|
||||
let code = 0
|
||||
|
|
Ładowanie…
Reference in New Issue