travis-r6s / gridsome-plugin-flexsearch

Add lightning fast search to Gridsome with FlexSearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v2 Causes undefined Error

RehanSaeed opened this issue · comments

I'm trying to upgrade to v2 and am getting the following error upon building:

image

Hey @RehanSaeed - Would you mind posting your gridsome.config.js please?

Sorry for the delay on this. Have just fixed the issue though, and released a patch version - 2.0.1.
I've tested it out on your repo, and it seems to build okay now.

Gave 2.0.1 a try. It now compiles fine and I can search to get results back but the result.path or result.node.permalink values are undefined.

I can confirm the same.

Thanks a lot by the way for introducing the GraphQL layer, @thetre97!

Ah, that is actually one big change I have made - apologies, I should have put that into the release notes.
The plugin doesn't automatically add the path field anymore, so you will have to add path or permalink to your collection fields, then you can access them from node.<field>.

That worked, thanks.