File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
packages/database/src/core Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import {
24
24
pathChild ,
25
25
pathContains ,
26
26
pathGetFront ,
27
+ pathIsEmpty ,
27
28
pathPopFront
28
29
} from './util/Path' ;
29
30
import {
@@ -570,7 +571,7 @@ export class WriteTree {
570
571
// b) not be relevant to a transaction (separate branch), so again will not affect the data for that transaction
571
572
if ( filter ( write ) ) {
572
573
const writePath = write . path ;
573
- let relativePath ;
574
+ let relativePath : Path ;
574
575
if ( write . snap ) {
575
576
if ( pathContains ( treeRoot , writePath ) ) {
576
577
relativePath = newRelativePath ( treeRoot , writePath ) ;
@@ -599,7 +600,7 @@ export class WriteTree {
599
600
) ;
600
601
} else if ( pathContains ( writePath , treeRoot ) ) {
601
602
relativePath = newRelativePath ( writePath , treeRoot ) ;
602
- if ( relativePath . isEmpty ( ) ) {
603
+ if ( pathIsEmpty ( relativePath ) ) {
603
604
compoundWrite = compoundWriteAddWrites (
604
605
compoundWrite ,
605
606
newEmptyPath ( ) ,
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import {
22
22
pathContains ,
23
23
pathGetBack ,
24
24
pathGetFront ,
25
+ pathSlice ,
25
26
ValidationPath
26
27
} from './Path' ;
27
28
import {
@@ -199,10 +200,10 @@ export const validateFirebaseMergePaths = function (
199
200
errorPrefix : string ,
200
201
mergePaths : Path [ ]
201
202
) {
202
- let i , curPath ;
203
+ let i , curPath : Path ;
203
204
for ( i = 0 ; i < mergePaths . length ; i ++ ) {
204
205
curPath = mergePaths [ i ] ;
205
- const keys = curPath . slice ( ) ;
206
+ const keys = pathSlice ( curPath ) ;
206
207
for ( let j = 0 ; j < keys . length ; j ++ ) {
207
208
if ( keys [ j ] === '.priority' && j === keys . length - 1 ) {
208
209
// .priority is OK
You can’t perform that action at this time.
0 commit comments