From 4ba28b8579b030af602f8c24f08ac93c033c1699 Mon Sep 17 00:00:00 2001 From: Andreas Reinhold / reini Date: Mon, 14 Sep 2026 05:41:14 +0200 Subject: [PATCH] Skip the swatch levels when the picker draws nothing Without profiles the component renders nothing, so it should not read the scheme file once per contrast level first. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9 --- resources/views/components/scheme-picker.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/components/scheme-picker.blade.php b/resources/views/components/scheme-picker.blade.php index dadb7c96..f02dab53 100644 --- a/resources/views/components/scheme-picker.blade.php +++ b/resources/views/components/scheme-picker.blade.php @@ -36,7 +36,7 @@ // colours — so the binding below never asks whether a level is there. $swatches = []; - foreach (\NoNameWeb\LivewireMaterial\Support\Scheme::LEVELS as $level) { + foreach ($profiles === [] ? [] : \NoNameWeb\LivewireMaterial\Support\Scheme::LEVELS as $level) { $generated = $level === 'standard' ? [] : \NoNameWeb\LivewireMaterial\Support\Scheme::profiles(contrast: $level); foreach ($profiles as $profile => $scheme) {