Skip to content

Commit cf553ac

Browse files
committed
proposed fix
1 parent 8d8af6b commit cf553ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LiveComponent/src/LiveComponentHydrator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
final class LiveComponentHydrator
2929
{
3030
private const CHECKSUM_KEY = '_checksum';
31-
private const EXPOSED_PROP_KEY = 'id';
31+
private const EXPOSED_PROP_KEY = '_id';
3232

3333
/** @var PropertyHydratorInterface[] */
3434
private iterable $propertyHydrators;
@@ -197,7 +197,7 @@ private function computeChecksum(array $data, array $readonlyProperties): string
197197
// for read-only properties with "exposed" sub-parts,
198198
// only use the main value
199199
foreach ($properties as $key => $val) {
200-
if (\in_array($key, $readonlyProperties) && \is_array($val)) {
200+
if (\in_array($key, $readonlyProperties) && \is_array($val) && isset($val[self::EXPOSED_PROP_KEY])) {
201201
$properties[$key] = $val[self::EXPOSED_PROP_KEY];
202202
}
203203
}

0 commit comments

Comments
 (0)