Skip to content

Commit

Permalink
Fix an error when saving a new site
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jul 10, 2024
1 parent 20207f4 commit b6f8671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/Vouchers.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function getVoucherById(int $id, $siteId = null): ?Voucher

public function afterSaveSiteHandler(SiteEvent $event): void
{
if ($event->isNew) {
if ($event->isNew && isset($event->oldPrimarySiteId)) {
$oldPrimarySiteId = $event->oldPrimarySiteId;

$elementTypes = [
Expand Down

0 comments on commit b6f8671

Please sign in to comment.