summaryrefslogtreecommitdiff
path: root/public/assets
diff options
context:
space:
mode:
authorjulian laplace <julescarbon@gmail.com>2022-10-30 00:23:38 +0200
committerjulian laplace <julescarbon@gmail.com>2022-10-30 00:23:38 +0200
commitbe6d4251172c1a13b2777ac09026f75744b8b0e4 (patch)
treebf1f893df68266ff5f82574c64f9728fd6cf972e /public/assets
parente3470c87f08b8f3134716c5a16daad4a2c572212 (diff)
check string
Diffstat (limited to 'public/assets')
-rw-r--r--public/assets/js/lib/views/index/hootbox.js1
-rw-r--r--public/assets/js/util/format.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/public/assets/js/lib/views/index/hootbox.js b/public/assets/js/lib/views/index/hootbox.js
index a5d2270..c874e74 100644
--- a/public/assets/js/lib/views/index/hootbox.js
+++ b/public/assets/js/lib/views/index/hootbox.js
@@ -29,6 +29,7 @@ var HootBox = FormView.extend({
},
parse: function (comment) {
+ console.log(comment);
var t = this.template
.replace(/{{image}}/g, profile_image(comment.username))
.replace(/{{username}}/g, comment.username)
diff --git a/public/assets/js/util/format.js b/public/assets/js/util/format.js
index 41d652a..416777b 100644
--- a/public/assets/js/util/format.js
+++ b/public/assets/js/util/format.js
@@ -334,7 +334,7 @@ function trimComment({ isViewingThread, lines, snippetSize, cropSize }) {
}
function tidy_urls(s, short_urls) {
- var ret = s
+ var ret = (s || "")
.split("\n")
.map(function (line) {
if (line.indexOf("<") !== -1) {