File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -1589,24 +1589,7 @@ RestWrite.prototype.buildUpdatedObject = function (extraData) {
1589
1589
const updatedObject = triggers . inflate ( extraData , this . originalData ) ;
1590
1590
Object . keys ( this . data ) . reduce ( function ( data , key ) {
1591
1591
if ( key . indexOf ( '.' ) > 0 ) {
1592
- if ( typeof data [ key ] . __op === 'string' ) {
1593
- updatedObject . set ( key , data [ key ] ) ;
1594
- } else {
1595
- // subdocument key with dot notation { 'x.y': v } => { 'x': { 'y' : v } })
1596
- const splittedKey = key . split ( '.' ) ;
1597
- const parentProp = splittedKey [ 0 ] ;
1598
- let parentVal = updatedObject . get ( parentProp ) ;
1599
- if ( typeof parentVal !== 'object' ) {
1600
- parentVal = { } ;
1601
- }
1602
- let curObj = parentVal ;
1603
- for ( let i = 1 ; i < splittedKey . length - 1 ; i ++ ) {
1604
- if ( typeof curObj [ splittedKey [ i ] ] === 'undefined' ) curObj [ splittedKey [ i ] ] = { } ;
1605
- curObj = curObj [ splittedKey [ i ] ] ;
1606
- }
1607
- curObj [ splittedKey [ splittedKey . length - 1 ] ] = data [ key ] ;
1608
- updatedObject . set ( parentProp , parentVal ) ;
1609
- }
1592
+ updatedObject . set ( key , data [ key ] ) ;
1610
1593
delete data [ key ] ;
1611
1594
}
1612
1595
return data ;
You can’t perform that action at this time.
0 commit comments