stormid / components

UI components
https://stormid.github.io/components/
MIT License
2 stars 2 forks source link

#245 Gallery returns an Object not an iterable Array #246

Closed Nick-StormID closed 1 year ago

Nick-StormID commented 1 year ago

Discovered whilst using the component that the docs implicitly suggest the returned gallery is an Array, whereas it is an Object. This causes errors:

Also noted that adding the trigger method ought to be protected by a check to see if a gallery exists, otherwise we have a breaking runtime error - can't add a lister to a null object. Added defensive conditional to example code.