Skip to content

Commit 4b51590

Browse files
author
ben
committed
+ PR77 #77 add contentWindow check
1 parent ffb548e commit 4b51590

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Gallery.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,11 @@ class Gallery extends Component {
260260
width: "100%"
261261
};
262262
return (
263-
<div id={this.props.id} className="ReactGridGallery" ref={(c) => this._gallery = c}>
264-
<iframe style={resizeIframeStyles} ref={(c) => c && c.contentWindow && c.contentWindow.addEventListener('resize', this.onResize) } />
263+
<div id={this.props.id}
264+
className="ReactGridGallery"
265+
ref={(c) => this._gallery = c}>
266+
<iframe style={resizeIframeStyles}
267+
ref={(c) => c && c.contentWindow && c.contentWindow.addEventListener('resize', this.onResize) } />
265268
{images}
266269
<Lightbox
267270
images={this.props.images}

0 commit comments

Comments
 (0)