From b89b107354e7a4dac07abcd06aec9a84bca6b20b Mon Sep 17 00:00:00 2001 From: Zh3nyaZh3nya Date: Thu, 19 Dec 2024 19:44:41 +0500 Subject: [PATCH] fixed storybook --- playground/pages/index.vue | 1 - src/runtime/components/Parts/Footer/Erg.vue | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/playground/pages/index.vue b/playground/pages/index.vue index 65d7984..49db77c 100644 --- a/playground/pages/index.vue +++ b/playground/pages/index.vue @@ -55,7 +55,6 @@ const cards = [ text: "A “card” is a UI design pattern that groups related information in a flexible-size container visually resembling a playing card.", date: "02.04.2023", author: "by Tyler, The Creator", - functionButton: testButtonNews, textButton: "Читать", }, { diff --git a/src/runtime/components/Parts/Footer/Erg.vue b/src/runtime/components/Parts/Footer/Erg.vue index 87857e2..36cacfe 100644 --- a/src/runtime/components/Parts/Footer/Erg.vue +++ b/src/runtime/components/Parts/Footer/Erg.vue @@ -178,7 +178,7 @@ const props = defineProps({ }) const isMultiParagraph = (html: string): boolean => { - if (!html || process.server) return false; + if (!html || import.meta.env.SSR) return false; // Проверяем серверную среду через Vite const parser = new DOMParser(); const doc = parser.parseFromString(html, 'text/html'); const paragraphs = doc.querySelectorAll('p, a, br');