From c05f4d4df6fb970a656b53f74dfbe8b8b8ad570b Mon Sep 17 00:00:00 2001 From: sacr3dc0w Date: Tue, 8 Sep 2020 09:36:33 -0700 Subject: [PATCH] PDP: Reduce lodash usage by utilizing object spread operator to set main image --- CHANGELOG.md | 1 + assets/js/theme/product/image-gallery.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) 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();