From 2c049e561160a93da717d915b6277913eb9ad4ce Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 27 May 2024 13:25:21 +0300 Subject: [PATCH] Remove imports from embedded styles --- public/scripts/chats.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/scripts/chats.js b/public/scripts/chats.js index 3187276d7..4bea9ed58 100644 --- a/public/scripts/chats.js +++ b/public/scripts/chats.js @@ -471,6 +471,9 @@ export function decodeStyleTags(text) { const rules = ast?.stylesheet?.rules; if (rules) { for (const rule of rules) { + if (rule.type === 'import') { + rules.splice(rules.indexOf(rule), 1); + } if (rule.type === 'rule') { if (rule.selectors) {