REFACTOR: removes useless conditional (#9674)

We already check if there's a post in the line before.
This commit is contained in:
Joffrey JAFFEUX 2020-05-07 16:34:25 +02:00 committed by GitHub
parent d5fe1279bd
commit a04b226c2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -20,12 +20,10 @@ export default class LinkLookup {
if (linkInfo) { if (linkInfo) {
if (post) { if (post) {
// Skip edits to the OP // Skip edits to the OP
if (post) {
const postNumber = post.get("post_number"); const postNumber = post.get("post_number");
if (postNumber === 1 || postNumber === linkInfo.post_number) { if (postNumber === 1 || postNumber === linkInfo.post_number) {
return NO_RESULT; return NO_RESULT;
} }
}
// Don't warn on older posts // Don't warn on older posts
const createdAt = moment(post.get("created_at")); const createdAt = moment(post.get("created_at"));