File tree 1 file changed +3
-2
lines changed
packages/firebase_firecms/src/utils
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export const localSearchControllerBuilder: FirestoreTextSearchControllerBuilder
22
22
if ( listeners [ path ] ) {
23
23
listeners [ path ] ( ) ;
24
24
delete listeners [ path ] ;
25
+ delete indexes [ path ] ;
25
26
}
26
27
}
27
28
@@ -42,9 +43,9 @@ export const localSearchControllerBuilder: FirestoreTextSearchControllerBuilder
42
43
currentPath = path ;
43
44
44
45
return new Promise ( async ( resolve , reject ) => {
45
- if ( ! indexes [ path ] && collectionProp ) {
46
+ if ( collectionProp ) {
46
47
console . debug ( "Init local search controller" , path ) ;
47
- const firestore = databaseId ? getFirestore ( firebaseApp , databaseId ) : getFirestore ( firebaseApp ) ;
48
+ const firestore = databaseId ? getFirestore ( firebaseApp , databaseId ) : getFirestore ( firebaseApp ) ;
48
49
const col = collection ( firestore , path ) ;
49
50
listeners [ path ] = onSnapshot ( query ( col ) ,
50
51
{
You can’t perform that action at this time.
0 commit comments