]> BookStack Code Mirror - bookstack/commitdiff
Fixes the comment check for linked comment.
authorAbijeet <redacted>
Mon, 21 Aug 2017 20:09:09 +0000 (01:39 +0530)
committerAbijeet <redacted>
Mon, 21 Aug 2017 20:09:09 +0000 (01:39 +0530)
resources/assets/js/vues/page-comments.js

index 4cdee05edab0fbef81d41ac3afa1e20afc56c0c8..6a550e991c8c59ee558d99c09c5e13400125d601 100644 (file)
@@ -104,11 +104,9 @@ function getUrlParameter(name) {
 
 function focusLinkedComment(linkedCommentId) {
     let comment = document.getElementById(linkedCommentId);
-    if (comment && comment.length === 0) {
-        return;
+    if (comment && comment.length !== 0) {
+        window.setupPageShow.goToText(linkedCommentId);
     }
-
-    window.setupPageShow.goToText(linkedCommentId);
 }
 
 module.exports = {