diff --git a/CHANGELOG.md b/CHANGELOG.md index 38f3f391be..112973ca8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- PDP: Reduce lodash usage by utilizing object spread operator to set main image [#1827](https://github.com/bigcommerce/cornerstone/pull/1827) - Create unified focus styling in Cornerstone. [#1812](https://github.com/bigcommerce/cornerstone/pull/1812) - Review link in quick modal focused twice. [#1797](https://github.com/bigcommerce/cornerstone/pull/1797) - Fixed product image doesn't change on click when viewing a product with multiple images in IE11 [#1748](https://github.com/bigcommerce/cornerstone/pull/1748) diff --git a/assets/js/theme/product/image-gallery.js b/assets/js/theme/product/image-gallery.js index 959a8b2efe..3032b57095 100644 --- a/assets/js/theme/product/image-gallery.js +++ b/assets/js/theme/product/image-gallery.js @@ -1,5 +1,4 @@ import 'easyzoom'; -import _ from 'lodash'; export default class ImageGallery { constructor($gallery) { @@ -15,7 +14,7 @@ export default class ImageGallery { } setMainImage(imgObj) { - this.currentImage = _.clone(imgObj); + this.currentImage = { ...imgObj }; this.setActiveThumb(); this.swapMainImage();