From d664ceef385510f15ca85d1dbcdb96ae5fd8e3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Goran=20Alkovi=C4=87?= <77000136+goranalkovic-infinum@users.noreply.github.com> Date: Thu, 3 Oct 2024 09:26:33 +0200 Subject: [PATCH] fix tailwindClasses combinations output --- scripts/editor/tailwindcss.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/editor/tailwindcss.js b/scripts/editor/tailwindcss.js index e5f960a..ae50217 100644 --- a/scripts/editor/tailwindcss.js +++ b/scripts/editor/tailwindcss.js @@ -435,12 +435,12 @@ const processCombination = (partName, combo, attributes, manifest) => { for (const [attributeName, allowedValue] of Object.entries(combo?.attributes ?? {})) { const optionValue = checkAttr(attributeName, attributes, manifest, true); - if (Array.isArray(allowedValue) && !allowedValue.includes(optionValue)) { + const isArrayCondition = Array.isArray(allowedValue); + + if (isArrayCondition && !allowedValue.includes(optionValue)) { matches = false; break; - } - - if (optionValue !== allowedValue) { + } else if (!isArrayCondition && optionValue !== allowedValue) { matches = false; break; }