Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fuse expects array not string #961

Merged
merged 1 commit into from Jul 28, 2023

Conversation

codebykenny
Copy link
Contributor

Fixes #949

At the moment new docus projects are breaking when you deploy, the reason is because we are feeding useFuse a string instead of an array.

You can see the root of the error here: https://github.com/krisk/Fuse/blob/f507e9f19ff022c13e4517ecff3e7a72ee2688ee/src/tools/FuseIndex.js#L38-L47

The $fetch to /api/search is not parsing the array, adding { parseResponse: JSON.parse } fixes this issue.


Steps to reproduce error on a brand new project:

npx nuxi@latest init docs -t themes/docus 
cd docs
npm install
npm run build
node .output/server/index.mjs

Kenny- 2023-07-26 at 12 50 02

@bdrtsky
Copy link
Contributor

bdrtsky commented Jul 28, 2023

Great, thank you for the fix 👍

@bdrtsky bdrtsky merged commit 85469db into nuxt-themes:main Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deployment Error
2 participants