mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't warn if the link is in the post you are editing
This commit is contained in:
parent
8491f8c48b
commit
42de1cc977
@ -18,8 +18,10 @@ export default class LinkLookup {
|
|||||||
|
|
||||||
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) { return NO_RESULT; }
|
if (postNumber === 1 || postNumber === linkInfo.post_number) { 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'));
|
||||||
|
Loading…
Reference in New Issue
Block a user