Skip to content

Commit 77e30e2

Browse files
committed
Improve bootstrap startup condition and comments
1 parent 713ff78 commit 77e30e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

config/functions/bootstrap.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function addHookedCollectionsToStore ({ store, collections }) {
4545
}
4646

4747
async function getHookedCollectionsFromStore ({ store }) {
48-
return store.get('meilisearch_hooked')
48+
return store.get({ key: 'meilisearch_hooked' })
4949
}
5050

5151
function addLifecycles ({ client, collections }) {
@@ -69,7 +69,8 @@ async function initHooks (store) {
6969
try {
7070
const credentials = await getCredentials()
7171
const getHookedCollections = await getHookedCollectionsFromStore({ store })
72-
72+
// If hooked collection is not found it means that no MeiliSearch
73+
// Indexes are to be hooked. Meaning we do not have to add any lifecycle.
7374
if (credentials.host && getHookedCollections) {
7475
const client = await getClient(credentials)
7576
// get list of indexes in MeiliSearch Instance

0 commit comments

Comments
 (0)