Commit 8773c72d authored by qinhaitao's avatar qinhaitao

fix: 🐛 bug

parent c3066737
...@@ -19,6 +19,9 @@ export function formatUpdateUserProjection(projection: IUpdateQuery): IUpdateQue ...@@ -19,6 +19,9 @@ export function formatUpdateUserProjection(projection: IUpdateQuery): IUpdateQue
if (projection['$push'] && !Object.keys(projection['$push']).length) { if (projection['$push'] && !Object.keys(projection['$push']).length) {
delete projection['$push'] delete projection['$push']
} }
if (projection['$inc'] && !Object.keys(projection['$inc']).length) {
delete projection['$inc']
}
console.log(projection) console.log(projection)
return projection return projection
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment