Skip to content

Commit

Permalink
Fixed type error
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Dec 4, 2024
1 parent 0c70bfa commit cd2a61a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Unreleased

- Fixed a bug where draft purchasables would show up on the Inventory page.
- Fixed a PHP error that could occur when creating inventory transfers.
- Fixed a PHP error that could occur when creating inventory transfers. ([#3696](https://github.com/craftcms/commerce/issues/3696))
- Fixed a bug where the price was not formatted correctly according to the locale in the payment model on the Order Edit screens. ([#3789](https://github.com/craftcms/commerce/issues/3789))

## 5.2.7 - 2024-11
Expand Down
3 changes: 2 additions & 1 deletion src/collections/UpdateInventoryLevelCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace craft\commerce\collections;

use craft\commerce\models\inventory\UpdateInventoryLevel;
use craft\commerce\models\inventory\UpdateInventoryLevelInTransfer;
use Illuminate\Support\Collection;

/**
Expand Down Expand Up @@ -46,7 +47,7 @@ public static function make($items = [])
*/
public function getPurchasables(): array
{
return $this->map(function(UpdateInventoryLevel $updateInventoryLevel) {
return $this->map(function(UpdateInventoryLevel|UpdateInventoryLevelInTransfer $updateInventoryLevel) {
return $updateInventoryLevel->inventoryItem->getPurchasable();
})->all();
}
Expand Down

0 comments on commit cd2a61a

Please sign in to comment.