From 54220ecfdccdd987e7fb3398a4587c5c8de3c88f Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Sun, 14 Sep 2025 10:49:40 +0100 Subject: [PATCH] Update HasState.php --- packages/schemas/src/Components/Concerns/HasState.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/schemas/src/Components/Concerns/HasState.php b/packages/schemas/src/Components/Concerns/HasState.php index 9e7f31521a..cd6206a526 100644 --- a/packages/schemas/src/Components/Concerns/HasState.php +++ b/packages/schemas/src/Components/Concerns/HasState.php @@ -169,7 +169,13 @@ trait HasState if (filled($components = $this->getComponentsToPartiallyRenderAfterStateUpdated())) { foreach ($components as $key) { - $this->getLivewire()->getSchemaComponent($this->resolveRelativeKey($key), withHidden: true)?->partiallyRender() ?? throw new InvalidArgumentException("Could not find component [{$key}] to partially render."); + $component = $this->getLivewire()->getSchemaComponent($this->resolveRelativeKey($key), withHidden: true); + + if (! $component) { + throw new InvalidArgumentException("Could not find component [{$key}] to partially render."); + } + + $component->partiallyRender(); } }