From bdfe37c70b587b498be0e27ca84559b1bd38d4a5 Mon Sep 17 00:00:00 2001 From: Swen Kooij Date: Fri, 23 Aug 2019 16:19:54 +0300 Subject: [PATCH] Fix type 'onCoverPhotoChange' -> 'onCoverPhotoChanged' --- build/image-gallery.js | 2 +- package.json | 2 +- src/ImageGallery.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/image-gallery.js b/build/image-gallery.js index aef2ec03..e1d8adb9 100644 --- a/build/image-gallery.js +++ b/build/image-gallery.js @@ -388,7 +388,7 @@ var ImageGallery = function (_React$Component) { var newCoverPhoto = this.props.items[this.props.startIndex] || {}; var coverPhotoChanged = prevCoverPhoto.id !== newCoverPhoto.id; - if (coverPhotoChange && this.props.onItemsGalleryChange) { + if (coverPhotoChanged && this.props.onItemsGalleryChange) { // call the callback function this.props.onItemsGalleryChange(); } diff --git a/package.json b/package.json index 95c6f3b7..990a50d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-image-gallery", - "version": "0.8.22-sl", + "version": "0.8.23-sl", "description": "React carousel image gallery component with thumbnail and mobile support", "main": "./build/image-gallery.js", "scripts": { diff --git a/src/ImageGallery.jsx b/src/ImageGallery.jsx index 09ba70b7..0923f759 100644 --- a/src/ImageGallery.jsx +++ b/src/ImageGallery.jsx @@ -185,7 +185,7 @@ export default class ImageGallery extends React.Component { const newCoverPhoto = this.props.items[this.props.startIndex] || {}; const coverPhotoChanged = prevCoverPhoto.id !== newCoverPhoto.id; - if (coverPhotoChange && this.props.onItemsGalleryChange) { + if (coverPhotoChanged && this.props.onItemsGalleryChange) { // call the callback function this.props.onItemsGalleryChange(); }