aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-02-27 13:36:50 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-02-27 13:36:50 -0500
commit67dfa43e8df1dbf3a3238a452531c10da46325b8 (patch)
treead7529d0b188db157de4b5622acc9b4603b8b0b9 /lib/serve.js
parentb5cec405f40f6e5b5d444613f5f2f6ebc42507aa (diff)
downloadpatchfoo-67dfa43e8df1dbf3a3238a452531c10da46325b8.tar.gz
patchfoo-67dfa43e8df1dbf3a3238a452531c10da46325b8.zip
Render more about values
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 556e70f..5f873e2 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1044,9 +1044,10 @@ Serve.prototype.about = function (path) {
}
function renderAboutOpValue(value) {
- if (!value) return
- if (u.isRef(value.link)) return self.phIdLink(value.link)
- if (value.epoch) return new Date(value.epoch).toUTCString()
+ if (typeof value === 'object' && value !== null) {
+ if (u.isRef(value.link)) return self.phIdLink(value.link)
+ if (value.epoch) return new Date(value.epoch).toUTCString()
+ }
return ph('code', {}, JSON.stringify(value))
}