Skip to content

Commit

Permalink
add null-check
Browse files Browse the repository at this point in the history
  • Loading branch information
pmattmann committed Jul 9, 2024
1 parent 6af1f65 commit 59a361e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/State/ContentNode/ChecklistNodePersistProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public function onBefore($data, Operation $operation, array $uriVariables = [],
if (null !== $data->removeChecklistItemIds) {
foreach ($data->removeChecklistItemIds as $checklistItemId) {
$checklistItem = $this->checklistItemRepository->find($checklistItemId);
$data->removeChecklistItem($checklistItem);
if (null != $checklistItem) {
$data->removeChecklistItem($checklistItem);
}
}
}

Expand Down

0 comments on commit 59a361e

Please sign in to comment.