aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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) {