From c0884e53acc8916fc0a9cf44186a53f44cf9d59d Mon Sep 17 00:00:00 2001 From: ynwd <10122431+ynwd@users.noreply.github.com> Date: Sun, 8 Sep 2024 09:36:11 +0700 Subject: [PATCH] fix: session on blog docs index --- modules/blog/mod.ts | 6 +++--- modules/docs/mod.ts | 6 +++--- modules/index/mod.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/blog/mod.ts b/modules/blog/mod.ts index 7982b917b..bdf572cdd 100644 --- a/modules/blog/mod.ts +++ b/modules/blog/mod.ts @@ -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; } } diff --git a/modules/docs/mod.ts b/modules/docs/mod.ts index 8448b4ab0..408a7a84f 100644 --- a/modules/docs/mod.ts +++ b/modules/docs/mod.ts @@ -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; } } diff --git a/modules/index/mod.ts b/modules/index/mod.ts index eb149f51e..f355f2c35 100644 --- a/modules/index/mod.ts +++ b/modules/index/mod.ts @@ -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; } }