Skip to content

Commit c213819

Browse files
authored
fix: waline comment data could return without time field (#379)
1 parent daa6a76 commit c213819

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/comments/waline-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class WalineComments {
111111
mapComment(comment: WalineComment): RecentComments {
112112
// slice off the last 5 character to remove the timezone.
113113
const createdAt = formatTime(
114-
new Date(comment.time).toISOString().slice(0, -5),
114+
new Date(comment.time ?? comment.insertedAt).toISOString().slice(0, -5),
115115
{
116116
lang: this.configs.lang
117117
}

0 commit comments

Comments
 (0)