Skip to content

Commit 4e6ce4b

Browse files
author
Shahen Hovhannisyan
authored
Update ImageViewer.js
1 parent dca83c8 commit 4e6ce4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ImageViewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export class ImageViewer extends Component {
257257
} else {
258258
this.state.backgroundOpacity.setValue(BACKGROUND_VALUES.MIN);
259259
// call prop
260-
if(this.props.onClose){
260+
if(typeof this.props.onClose === 'function'){
261261
this.props.onClose()
262262
}
263263
}

0 commit comments

Comments
 (0)