Skip to content

Commit

Permalink
fix: session on blog docs index
Browse files Browse the repository at this point in the history
  • Loading branch information
ynwd committed Sep 8, 2024
1 parent 8be6c2c commit c0884e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions modules/blog/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default function (s: Fastro) {
let html_url = "";
if (sessionId) {
const r = ctx.server.serverOptions[sessionId];
if (r && r.value) {
avatar_url = r.value.avatar_url;
html_url = r.value.html_url;
if (r) {
avatar_url = r.avatar_url;
html_url = r.html_url;
}
}

Expand Down
6 changes: 3 additions & 3 deletions modules/docs/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export default function (s: Fastro) {
let html_url = "";
if (sessionId) {
const r = ctx.server.serverOptions[sessionId];
if (r && r.value) {
avatar_url = r.value.avatar_url;
html_url = r.value.html_url;
if (r) {
avatar_url = r.avatar_url;
html_url = r.html_url;
}
}

Expand Down
6 changes: 3 additions & 3 deletions modules/index/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export default function (s: Fastro) {
let html_url = "";
if (sessionId) {
const r = ctx.server.serverOptions[sessionId];
if (r && r.value) {
avatar_url = r.value.avatar_url;
html_url = r.value.html_url;
if (r) {
avatar_url = r.avatar_url;
html_url = r.html_url;
}
}

Expand Down

0 comments on commit c0884e5

Please sign in to comment.