REFACTOR: removes useless conditional (#9674)

REFACTOR: removes useless conditional (#9674)

We already check if there’s a post in the line before.

diff --git a/app/assets/javascripts/discourse/app/lib/link-lookup.js b/app/assets/javascripts/discourse/app/lib/link-lookup.js
index 2789876..0d742da 100644
--- a/app/assets/javascripts/discourse/app/lib/link-lookup.js
+++ b/app/assets/javascripts/discourse/app/lib/link-lookup.js
@@ -20,11 +20,9 @@ export default class LinkLookup {
     if (linkInfo) {
       if (post) {
         // Skip edits to the OP
-        if (post) {
-          const postNumber = post.get("post_number");
-          if (postNumber === 1 || postNumber === linkInfo.post_number) {
-            return NO_RESULT;
-          }
+        const postNumber = post.get("post_number");
+        if (postNumber === 1 || postNumber === linkInfo.post_number) {
+          return NO_RESULT;
         }
 
         // Don't warn on older posts

GitHub sha: a04b226c

This commit appears in #9674 which was approved by eviltrout. It was merged by jjaffeux.