Skip to content

Commit 42f35b7

Browse files
committed
Return empty on empty
1 parent e2bdc83 commit 42f35b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Database/Database.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4449,6 +4449,10 @@ public function updateDocument(string $collection, string $id, Document $documen
44494449
return $document;
44504450
});
44514451

4452+
if ($document->isEmpty()) {
4453+
return $document;
4454+
}
4455+
44524456
if ($this->resolveRelationships) {
44534457
$document = $this->silent(fn () => $this->populateDocumentRelationships($collection, $document));
44544458
}

0 commit comments

Comments
 (0)