darthmeme / gridsome-plugin-rss

Generate an RSS feed from your Gridsome data store
16 stars 11 forks source link

Fixed issue with loadSource which was causing build break #21

Open kumarsunil0007 opened 7 months ago

kumarsunil0007 commented 7 months ago

This will be called before the store is initialized which will result in collection to be undefined and finally it will fail build process. At least for sanity, add condition to check if collection exist so that it will not end up with follow error:

Cannot destructure property 'collection' of 'store.getCollection(...)' as it is undefined.

For another issues which will be caused by blank array for data, you will need to call this function inside beforeBuild event so that data is available there.