diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-15 13:06:39 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-15 13:06:39 -1000 |
commit | 58b40d18c7d49ef071ece70af5e6d9e1d12301e2 (patch) | |
tree | 9522535c9e1db5785461608762faf3998a732ce1 /lib/util.js | |
parent | 7570f001cc8ddeff88ebdab640e06a0b1b03974c (diff) | |
parent | f826bdf13d9bbdfd31a38bfdff382106b8edfd52 (diff) | |
download | patchfoo-58b40d18c7d49ef071ece70af5e6d9e1d12301e2.tar.gz patchfoo-58b40d18c7d49ef071ece70af5e6d9e1d12301e2.zip |
Merge branch 'master' into about
Diffstat (limited to 'lib/util.js')
-rw-r--r-- | lib/util.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util.js b/lib/util.js index 2c0cf03..5546716 100644 --- a/lib/util.js +++ b/lib/util.js @@ -6,6 +6,7 @@ var u = exports u.ssbRefRegex = /((?:@|%|&|ssb:\/\/%)[A-Za-z0-9\/+]{43}=\.[\w\d]+)/g u.isRef = function (str) { + if (!str) return false u.ssbRefRegex.lastIndex = 0 return u.ssbRefRegex.test(str) } @@ -38,7 +39,7 @@ u.toHTML = function (el) { return h('div', el).innerHTML } var html = el.outerHTML || String(el) - if (el.nodeName === 'html') html = '<!doctype html><link rel="icon" href="static/hermie.ico" type="image/x-icon"/>' + html + '\n' + if (el.nodeName === 'html') html = '<!doctype html>' + html + '\n' return html } |