Skip to content

Commit

Permalink
fix(ordernotes): bail early without order (#788)
Browse files Browse the repository at this point in the history
Resolves #772
  • Loading branch information
joerivanveen authored Nov 23, 2023
1 parent 8e29ac1 commit 37bacb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Observer/SalesOrderStatusHistoryObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public function execute(Observer $observer): self
$history = $observer->getData()['status_history'] ?? null;

if (! is_a($history, History::class)
|| ! $history->getComment()) {
|| ! $history->getComment()
|| ! $history->getOrder()
) {
return $this;
}

Expand Down

0 comments on commit 37bacb5

Please sign in to comment.