Skip to content

Commit 0552134

Browse files
committed
Fix for initialising local text search again
1 parent dc6d09f commit 0552134

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/firebase_firecms/src/utils/local_text_search_controller.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const localSearchControllerBuilder: FirestoreTextSearchControllerBuilder
2222
if (listeners[path]) {
2323
listeners[path]();
2424
delete listeners[path];
25+
delete indexes[path];
2526
}
2627
}
2728

@@ -42,9 +43,9 @@ export const localSearchControllerBuilder: FirestoreTextSearchControllerBuilder
4243
currentPath = path;
4344

4445
return new Promise(async (resolve, reject) => {
45-
if (!indexes[path] && collectionProp) {
46+
if (collectionProp) {
4647
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);
4849
const col = collection(firestore, path);
4950
listeners[path] = onSnapshot(query(col),
5051
{

0 commit comments

Comments
 (0)