Skip to content

Commit 8926b20

Browse files
Update src/runtime/composables/useAlgoliaRecommend.ts
Co-authored-by: Jakub Andrzejewski <jakub.andrzejewski.dev@gmail.com>
1 parent 32ee1d5 commit 8926b20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/composables/useAlgoliaRecommend.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function useAlgoliaRecommend<T> (key: string = ''): UseAlgoliaRecommend<T
2222
throw new Error('`[@nuxtjs/algolia]` Cannot call useAlgoliaRecommend composable due to missing `algolia.recommend` option.')
2323
}
2424

25-
const result = useState('recommend-result' + key, () => null)
25+
const result = useState(`recommend-result${key ? '-' + key : ''}`, () => null)
2626

2727
const get = async ({ queries, requestOptions }: RecommendParams) => {
2828
result.value = await algoliaRecommend.getRecommendations<T>(queries, requestOptions)

0 commit comments

Comments
 (0)