From a2de882ed6954230007048f0b91594bef28a8695 Mon Sep 17 00:00:00 2001 From: "Mt.r" Date: Wed, 6 Sep 2023 22:26:26 +0800 Subject: [PATCH] fix(client/public): avoid global variable --- client/public/index.html | 2 +- libs/constants/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/public/index.html b/client/public/index.html index def2f16ba351..698f977548fd 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -109,8 +109,8 @@ { capture: true } ); - const c = { light: "#ffffff", dark: "#1b1b1b" }; if (window && document.documentElement) { + const c = { light: "#ffffff", dark: "#1b1b1b" }; try { const o = window.localStorage.getItem("theme"); o && diff --git a/libs/constants/index.js b/libs/constants/index.js index c4124f9921f0..d3b27feacf99 100644 --- a/libs/constants/index.js +++ b/libs/constants/index.js @@ -80,9 +80,9 @@ export const CSP_SCRIPT_SRC_VALUES = [ // 1. Theme switching. // - Previous hash (to avoid cache invalidation issues): - "'sha256-GA8+DpFnqAM/vwERTpb5zyLUaN5KnOhctfTsqWfhaUA='", - // - Current hash: "'sha256-uogddBLIKmJa413dyT0iPejBg3VFcO+4x6B+vw3jng0='", + // - Current hash: + "'sha256-EehWlTYp7Bqy57gDeQttaWKp0ukTTEUKGP44h8GVeik='", ]; export const CSP_DIRECTIVES = { "default-src": ["'self'"],