aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/static
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/static')
-rw-r--r--juick-www/src/main/static/scripts.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/juick-www/src/main/static/scripts.js b/juick-www/src/main/static/scripts.js
index d7c3ffe9..b9becc16 100644
--- a/juick-www/src/main/static/scripts.js
+++ b/juick-www/src/main/static/scripts.js
@@ -215,7 +215,9 @@ function onsubmitNewMessage() {
}
function showMoreReplies(el, id) {
- el.closest('li').querySelector('.msg-comments').style.display = 'none';
+ var foldedReplies = el.closest('li').querySelector('.msg-comments');
+ if (!foldedReplies) { return }
+ foldedReplies.style.display = 'none';
var replies = document.querySelectorAll('#replies>li'),
flagshow = 0,
@@ -370,7 +372,7 @@ function unfoldReply() {
while (el.style.display === 'none') {
el = el.previousElementSibling;
}
- showMoreReplies(el);
+ showMoreReplies(el, anchor);
window.location.replace(window.location.hash);
}
}