File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/database/src/core Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -458,13 +458,19 @@ export function repoGetValue(repo: Repo, query: QueryContext): Promise<Node> {
458458 }
459459 return repo . server_ . get ( query ) . then (
460460 payload => {
461- const node = nodeFromJSON ( payload as string ) ;
461+ const node = nodeFromJSON ( payload as string ) . withIndex (
462+ query . _queryParams . getIndex ( )
463+ ) ;
462464 const events = syncTreeApplyServerOverwrite (
463465 repo . serverSyncTree_ ,
464466 query . _path ,
465467 node
466468 ) ;
467- eventQueueRaiseEventsAtPath ( repo . eventQueue_ , query . _path , events ) ;
469+ let affectedPath = query . _path ;
470+ if ( events . length > 0 ) {
471+ affectedPath = repoRerunTransactions ( repo , query . _path ) ;
472+ }
473+ eventQueueRaiseEventsAtPath ( repo . eventQueue_ , affectedPath , events ) ;
468474 return Promise . resolve ( node ) ;
469475 } ,
470476 err => {
You can’t perform that action at this time.
0 commit comments