From ec2ae41b815c4c465a856d800709de6147e5e54f Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 17 Mar 2023 02:27:53 +0900 Subject: refactor: make Document type class --- nuldoc-src/commands/build.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nuldoc-src/commands') diff --git a/nuldoc-src/commands/build.ts b/nuldoc-src/commands/build.ts index 734f520..8765802 100644 --- a/nuldoc-src/commands/build.ts +++ b/nuldoc-src/commands/build.ts @@ -117,8 +117,8 @@ function collectTags(posts: Document[]): [string, Document[]][] { result.push([ tag, tagsAndPosts.get(tag).sort((a: Document, b: Document) => { - const ta = a.revisions[0].date; - const tb = b.revisions[0].date; + const ta = a.getCreatedDate(); + const tb = b.getCreatedDate(); if (ta > tb) return -1; if (ta < tb) return 1; return 0; -- cgit v1.2.3-70-g09d2