algolia / gatsby-plugin-algolia

A plugin to push to Algolia based on graphQl queries
https://yarn.pm/gatsby-plugin-algolia
Apache License 2.0
178 stars 45 forks source link

fix: allow "id" instead of "objectID" again #56

Closed ahmetkuslular closed 4 years ago

ahmetkuslular commented 4 years ago

Since it accepted the objectID not coming before, it started to receive an error in cases where the objectID was not passed from version 0.8.

I think this should be true even if the objectID is not correct to be managed by algolia.

It should also accept the default id bypassing the objectID.

For this, if the objectID or id is missing, I let it add normally without comparison. I also copied it to use it as an objectID if id came.

fixes #55

Haroenv commented 4 years ago

Thanks @ahmetkuslular! I've published this in 0.8.1

ahmetkuslular commented 4 years ago

thank you for your time @Haroenv