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(); } }