From 45ce8679ad9c04279507feb094520fd5a7c319fc Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Thu, 19 Dec 2024 17:07:43 +0800 Subject: [PATCH] :bug: Fix(PostChat): null pointer rrror --- assets/js/theme.js | 3 +-- layouts/partials/init/index.html | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index da77d085..718a73e9 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -1148,8 +1148,7 @@ class FixIt { } initPostChatUser() { - window.postChat_mode = postChatConfig.userMode || 'iframe'; - if (window.postChat_mode !== 'iframe' || !window.postChatUser) { + if (!window.postChatUser || !postChatConfig || postChatConfig.userMode === 'magic') { return; } postChat_theme = this.isDark ? 'dark' : 'light'; diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index 6bf4bca8..55a42ecf 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.17-637c4641" -}} +{{- .Scratch.Set "version" "v0.3.17-036cbb41" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}