diff --git a/frontend/src/pages/_document.tsx b/frontend/src/pages/_document.tsx index a7bf82c5c..8bbebe338 100644 --- a/frontend/src/pages/_document.tsx +++ b/frontend/src/pages/_document.tsx @@ -56,7 +56,9 @@ const MyDocument: React.FC = () => { --color-events: ${events}; } `} - {style !== undefined && } + {style !== undefined && ( + + )}
diff --git a/frontend/src/services/rewriteBuildedPages.mjs b/frontend/src/services/rewriteBuildedPages.mjs index 1da583f13..caf55791a 100644 --- a/frontend/src/services/rewriteBuildedPages.mjs +++ b/frontend/src/services/rewriteBuildedPages.mjs @@ -6,23 +6,20 @@ import { runtimeConfig } from './getConfig.mjs'; /** @type {ColorsConfig} */ const colors = runtimeConfig.colors; -const colorsAsString = Object.entries(colors).reduce( - (list, [key, value]) => { - if (!value) { - return list; - } - if (typeof value === 'string') { - list.push(`--color-${key}: ${value}`.toLowerCase()); - } else if(typeof value === 'object' && !Array.isArray(value)) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - Object.entries(value).forEach(item => { - list.push(`--color-${key}-${item[0]}: ${item[1]}`.toLowerCase()); - }); - } +const colorsAsString = Object.entries(colors).reduce((list, [key, value]) => { + if (!value) { return list; - }, - [], -); + } + if (typeof value === 'string') { + list.push(`--color-${key}: ${value}`.toLowerCase()); + } else if (typeof value === 'object' && !Array.isArray(value)) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + Object.entries(value).forEach(item => { + list.push(`--color-${key}-${item[0]}: ${item[1]}`.toLowerCase()); + }); + } + return list; +}, []); const rewriteBuildedPages = () => { const pages = ['404', '_offline', 'offline']; @@ -33,7 +30,7 @@ const rewriteBuildedPages = () => { // All HTML configuration will not be displayed. Scripts are removed to avoid breaking the page .replace(new RegExp('