aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-07-10 13:35:33 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-07-10 13:35:33 -1000
commit99751530687fd14483071de4ae97c2caac667c92 (patch)
treef49a11e77e6adf3f43edbf3ba7299fea700d0096 /lib
parent3e303fe722d3852f27a5f8ce86cbe0cc15584649 (diff)
downloadpatchfoo-99751530687fd14483071de4ae97c2caac667c92.tar.gz
patchfoo-99751530687fd14483071de4ae97c2caac667c92.zip
Improve links on about pages
Diffstat (limited to 'lib')
-rw-r--r--lib/about.js5
-rw-r--r--lib/util.js2
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/about.js b/lib/about.js
index 4ad153b..bb292f6 100644
--- a/lib/about.js
+++ b/lib/about.js
@@ -20,15 +20,14 @@ About.prototype.createAboutOpStream = function (id) {
&& key !== 'type'
&& key !== 'recps'
}).map(function (key) {
- var value = u.linkDest(c[key])
- // if (u.isRef(value)) value = {link: value}
+ var value = u.toLink(c[key])
return {
id: msg.key,
author: msg.value.author,
timestamp: msg.value.timestamp,
prop: key,
value: value,
- remove: value && typeof value === 'object' && value.remove,
+ remove: value && value.remove,
}
})
}),
diff --git a/lib/util.js b/lib/util.js
index 713705d..c6a4aa2 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -72,7 +72,7 @@ u.ifNumber = function (num) {
}
u.toLink = function (link) {
- return typeof link === 'string' ? {link: link} : link
+ return typeof link === 'string' ? {link: link} : link || null
}
u.linkDest = function (link) {