diff --git a/lib/algolia.js b/lib/algolia.js index d2d9cb37..fe2f9a83 100644 --- a/lib/algolia.js +++ b/lib/algolia.js @@ -42,7 +42,7 @@ const uploadDataToAlgolia = async(post) => { if (!existed || !existed?.lastEditedDate || !existed?.lastIndexDate) { needUpdateIndex = true } else { - const lastEditedDate = new Date(existed.lastEditedDate) + const lastEditedDate = new Date(post.lastEditedDate) const lastIndexDate = new Date(existed.lastIndexDate) if (lastEditedDate.getTime() > lastIndexDate.getTime()) { needUpdateIndex = true