Skip to content

Commit 82aa0e8

Browse files
committed
Only trigger deleted if deleted
1 parent 42f35b7 commit 82aa0e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Database/Database.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5576,7 +5576,9 @@ public function deleteDocument(string $collection, string $id): bool
55765576
return $result;
55775577
});
55785578

5579-
$this->trigger(self::EVENT_DOCUMENT_DELETE, $document);
5579+
if ($deleted) {
5580+
$this->trigger(self::EVENT_DOCUMENT_DELETE, $document);
5581+
}
55805582

55815583
return $deleted;
55825584
}

0 commit comments

Comments
 (0)