Commit 060c5d20 authored by qinhaitao's avatar qinhaitao

fix: 🐛 bug

parent f4428a44
...@@ -66,7 +66,7 @@ export function formatUpdatedDataByProjection(dbData: any, projection: IPreUpdat ...@@ -66,7 +66,7 @@ export function formatUpdatedDataByProjection(dbData: any, projection: IPreUpdat
if (!isEmpty(projection.$push)) { if (!isEmpty(projection.$push)) {
Object.keys(projection.$push).forEach(key => { Object.keys(projection.$push).forEach(key => {
const originValue = get(key, updatedDbData) || [] const originValue = get(key, updatedDbData) || []
set(key, [originValue, ...(projection.$push?.[key] || [])], updatedDbData) set(key, [originValue, projection.$push?.[key]], updatedDbData)
}) })
} }
return updatedDbData return updatedDbData
......
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