Skip to content

Commit 1e23d94

Browse files
committed
Fix InvoiceCreator demo
1 parent 8db386c commit 1e23d94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ux.symfony.com/src/Twig/InvoiceCreator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ public function onLineItemEditModeChange(#[LiveArg] int $key, #[LiveArg] $isEdit
8383
}
8484

8585
#[LiveListener('line_item:save')]
86-
public function saveLineItem(#[LiveArg] int $key, #[LiveArg] Product $product, #[LiveArg] int $quantity): void
86+
public function saveLineItem(#[LiveArg] int $key, #[LiveArg] int $product, #[LiveArg] int $quantity): void
8787
{
8888
if (!isset($this->lineItems[$key])) {
8989
// shouldn't happen
9090
return;
9191
}
9292

93-
$this->lineItems[$key]['productId'] = $product->getId();
93+
$this->lineItems[$key]['productId'] = $product;
9494
$this->lineItems[$key]['quantity'] = $quantity;
9595
}
9696

0 commit comments

Comments
 (0)