fix issue with website glyph browser for glyphs w/o a unicode mapping

This commit is contained in:
Rasmus Andersson 2017-08-28 18:37:38 -07:00
parent 5f23e674d4
commit ae2dbf0991

View file

@ -519,7 +519,11 @@ function renderSingleInfo(g) {
function configureUnicodeView(el, g) { function configureUnicodeView(el, g) {
var a = el.querySelector('a') var a = el.querySelector('a')
a.href = "https://codepoints.net/U+" + fmthex(g.unicode, 4) if (g.unicode) {
a.href = "https://codepoints.net/U+" + fmthex(g.unicode, 4)
} else {
a.href = ''
}
setv(el, 'unicodeCodePoint', g.unicode ? 'U+' + fmthex(g.unicode, 4) : '') setv(el, 'unicodeCodePoint', g.unicode ? 'U+' + fmthex(g.unicode, 4) : '')
setv(el, 'unicodeName', g.unicodeName || '') setv(el, 'unicodeName', g.unicodeName || '')
} }