mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-14 04:08:19 +00:00
Fix get attributes diff (#5658)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
ce6ce23444
commit
053a43e878
@ -11,6 +11,10 @@ function diffAttributes (doc: Data<Doc>, newDoc: Data<Doc>): DocumentUpdate<Doc>
|
|||||||
const newDocuments = new Map(Object.entries(newDoc))
|
const newDocuments = new Map(Object.entries(newDoc))
|
||||||
|
|
||||||
for (const [key, value] of allDocuments) {
|
for (const [key, value] of allDocuments) {
|
||||||
|
if (!newDocuments.has(key)) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
const newValue = toUndef(newDocuments.get(key))
|
const newValue = toUndef(newDocuments.get(key))
|
||||||
if (!deepEqual(newValue, toUndef(value))) {
|
if (!deepEqual(newValue, toUndef(value))) {
|
||||||
// update is required, since values are different
|
// update is required, since values are different
|
||||||
|
Loading…
Reference in New Issue
Block a user