Merge pull request #17520 from woocommerce/fix/17403

Fixes a flexslider bug when there is only 1 image on the product page.
This commit is contained in:
Claudiu Lodromanean 2017-11-02 10:45:00 -07:00 committed by GitHub
commit 120b67b8af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -100,6 +100,11 @@ jQuery( function( $ ) {
this.photoswipe_enabled = false === args.photoswipe_enabled ? false : this.photoswipe_enabled;
}
// ...and what is in the gallery.
if ( 1 === this.$images.length ) {
this.flexslider_enabled = false;
}
// Bind functions to this.
this.initFlexslider = this.initFlexslider.bind( this );
this.initZoom = this.initZoom.bind( this );

File diff suppressed because one or more lines are too long