Skip to content

Commit 15ac89c

Browse files
smnandreKocal
andauthored
Update src/TwigComponent/src/ComponentFactory.php
Co-authored-by: Hugo Alliaume <[email protected]>
1 parent 1f8eecd commit 15ac89c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TwigComponent/src/ComponentFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ private function mount(object $component, array &$data): void
151151
return;
152152
}
153153

154-
if (!\array_key_exists($component::class, self::$mountMethods)) {
154+
if (null === (self::$mountMethods[$component::class] ?? null)) {
155155
try {
156156
$mountMethod = self::$mountMethods[$component::class] = (new \ReflectionClass($component))->getMethod('mount');
157157
} catch (\ReflectionException) {

0 commit comments

Comments
 (0)