Skip to content

Commit 9459594

Browse files
committed
fix #24
1 parent 3c8d289 commit 9459594

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codedoc/coding-blog-plugin",
3-
"version": "0.1.11",
3+
"version": "0.1.12",
44
"description": "A CODEDOC plugin for blogging.",
55
"main": "dist/es5/index.js",
66
"module": "dist/es6/index.js",

src/components/author/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface CommitType {
3434
name: string;
3535
}
3636
},
37-
author: {
37+
author?: {
3838
avatar_url: string;
3939
html_url: string;
4040
}
@@ -72,8 +72,8 @@ export function Author(
7272
.subscribe(res => {
7373
if (res.length) {
7474
const commit = res[0];
75-
avatar.next(commit.author.avatar_url || _DefaultAvatar);
76-
url.next(commit.author.html_url);
75+
avatar.next(commit.author?.avatar_url || _DefaultAvatar);
76+
url.next(commit.author?.html_url || '');
7777
name.next(commit.commit.author.name);
7878
const dateString = !!options.date ? options.date : commit.commit.author.date;
7979
date.next(new Date(dateString).toDateString());

0 commit comments

Comments
 (0)