Skip to content

Commit

Permalink
PDP: Reduce lodash usage by utilizing object spread operator to set m…
Browse files Browse the repository at this point in the history
…ain image
  • Loading branch information
sacr3dc0w committed Sep 8, 2020
1 parent 797b3da commit c05f4d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
3 changes: 1 addition & 2 deletions assets/js/theme/product/image-gallery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'easyzoom';
import _ from 'lodash';

export default class ImageGallery {
constructor($gallery) {
Expand All @@ -15,7 +14,7 @@ export default class ImageGallery {
}

setMainImage(imgObj) {
this.currentImage = _.clone(imgObj);
this.currentImage = { ...imgObj };

this.setActiveThumb();
this.swapMainImage();
Expand Down

0 comments on commit c05f4d4

Please sign in to comment.