File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,16 @@ async function syncIndexedCollections({
3737 const contentTypes = contentTypeService . getContentTypesUid ( )
3838
3939 for ( const contentType of contentTypes ) {
40- const indexUid = meilisearch . getIndexNameOfContentType ( { contentType } )
41- const indexInMeiliSearch = indexUids . includes ( indexUid )
40+ const contentTypeIndexUids = await meilisearch . getIndexNamesOfContentType ( {
41+ contentType,
42+ } )
43+ const indexesInMeiliSearch = contentTypeIndexUids . some ( indexUid =>
44+ indexUids . includes ( indexUid ) ,
45+ )
4246 const contentTypeInIndexStore = indexedContentTypes . includes ( contentType )
4347
4448 // Remove any collection that is not in Meilisearch anymore
45- if ( ! indexInMeiliSearch && contentTypeInIndexStore ) {
49+ if ( ! indexesInMeiliSearch && contentTypeInIndexStore ) {
4650 await store . removeIndexedContentType ( { contentType } )
4751 }
4852 }
You can’t perform that action at this time.
0 commit comments