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

LightBox srcSet property to support string and array #235

Closed
lordoffreaks opened this issue Jun 14, 2018 · 0 comments
Closed

LightBox srcSet property to support string and array #235

lordoffreaks opened this issue Jun 14, 2018 · 0 comments

Comments

@lordoffreaks
Copy link
Contributor

Steps to reproduce the behavior:
Using gatsby the srcSet property returned by graphql is a string not an array
Expected behavior:
work
Actual behavior:
Invalid prop images[0].srcSet of type string supplied to Lightbox, expected array.

The proposed fix would be to set
srcSet: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
in https://github.com/jossmac/react-images/blob/master/src/Lightbox.js#L378 as done in https://github.com/neptunian/react-photo-gallery/blob/master/src/Photo.js#L28

Thanks!

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

No branches or pull requests

2 participants