fix: don't update edit data if edited timestamp is not available

This commit is contained in:
Julian Lam
2023-06-09 12:44:06 -04:00
parent b73f307abe
commit c5cd76e798

View File

@@ -142,6 +142,7 @@ define('forum/topic/events', [
posts.addBlockquoteEllipses(editedPostEl.parent());
editedPostEl.fadeIn(250);
if (data.post.edited) {
const editData = {
editor: data.editor,
editedISO: utils.toISOString(data.post.edited),
@@ -155,6 +156,7 @@ define('forum/topic/events', [
postContainer.find('[component="post/editor"] .timeago').timeago();
hooks.fire('action:posts.edited', data);
});
}
});
} else {
hooks.fire('action:posts.edited', data);