-
Notifications
You must be signed in to change notification settings - Fork 102
fix getElementsByTagName error #36
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
base: master
Are you sure you want to change the base?
Conversation
The initialization should be done once to avoid referencing the wrong function. In this case `options.getThumbBoundsFn = options.getThumbBoundsFn || getThumbBoundsFn;` was referencing the previous getThumbBoundsFn.
|
@minhtranite please merge |
|
This is also a problem for us! Merging would be nice. regards |
src/PhotoSwipeGallery.js
Outdated
|
|
||
| showPhotoSwipe = itemIndex => (e) => { | ||
| showPhotoSwipe = index => (e) => { | ||
| console.log('click photo') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console usage
src/PhotoSwipeGallery.js
Outdated
| state = { | ||
| isOpen: this.props.isOpen, | ||
| options: this.props.options | ||
| options: this.props.options || this.getThumbBoundsFn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this.props.options is undefined, state.options will be a function instead of an object?
|
@tzachyrm good point! Looking at it now, I am not sure why I did that. |
|
@minhtranite can you please merge this? |
|
For some reason it doesn't fix the mentioned issue. There's another fork of this branch at vildehav/react-photoswipe and it solves the issue for me. It's also available on npm. |
closes #35
closes #23