From 3cdf7b68141b08c02649df102ed1b4eefc69dba6 Mon Sep 17 00:00:00 2001 From: Valentyne Stigloher Date: Sat, 17 Feb 2024 19:28:13 +0100 Subject: [PATCH] (fix) use first value in case variables.scss define multiple values per variable defect: /api/banner crashes as no variable was found for the font --- server/localeFont.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/localeFont.js b/server/localeFont.js index dccd5aaa6..4c497a840 100644 --- a/server/localeFont.js +++ b/server/localeFont.js @@ -6,7 +6,7 @@ const __dirname = new URL('.', import.meta.url).pathname; const vars = {}; for (const [, name, value] of fs.readFileSync(`${__dirname}/../data/variables.scss`).toString('utf-8') - .matchAll(/^\$([^:]+): '([^']+)';$/gm)) { + .matchAll(/^\$([^:]+): '([^']+)'(?:, '[^']+')*;$/gm)) { vars[name] = value; }