Fixed remove properties not being correctly bulk written

This commit is contained in:
ThaumRystra
2024-09-02 23:29:16 +02:00
parent b1e7ac1161
commit 2f2a062273

View File

@@ -35,8 +35,13 @@ export default function mutationToPropUpdates(mutation: Mutation) {
}
// Remove creature properties
if (mutation.removals) for (const removeOne of mutation.removals) {
console.log(removeOne);
bulkWriteOps.push({
removeOne,
deleteOne: {
filter: {
_id: removeOne.propId
},
},
});
}
return bulkWriteOps;