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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
6aa8a48084
commit
4ba28b8579
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user