Skip to content

Conversation

@element6
Copy link

closes #35
closes #23

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.
@Yuripetusko
Copy link

@minhtranite please merge

@toxsick
Copy link

toxsick commented Feb 7, 2018

This is also a problem for us! Merging would be nice.

regards


showPhotoSwipe = itemIndex => (e) => {
showPhotoSwipe = index => (e) => {
console.log('click photo')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove console usage

state = {
isOpen: this.props.isOpen,
options: this.props.options
options: this.props.options || this.getThumbBoundsFn

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?

@element6
Copy link
Author

@tzachyrm good point! Looking at it now, I am not sure why I did that.

@tzachyrm
Copy link

@minhtranite can you please merge this?

@huhassan
Copy link

huhassan commented Sep 3, 2019

For some reason it doesn't fix the mentioned issue.
Uncaught TypeError: Cannot read property 'getElementsByTagName' of null

There's another fork of this branch at vildehav/react-photoswipe and it solves the issue for me. It's also available on npm.
npm i @dlab/react-photoswipe

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

Successfully merging this pull request may close these issues.

Can't take getElementsByTagName() of null. Wtf? Cannot read property 'getElementsByTagName' of null

5 participants