Skip to content

Commit e03485b

Browse files
committed
Fixed conflict swatch images
1 parent 7cd671c commit e03485b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

etc/config.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
* @Author: nguyen
44
* @Date: 2020-02-12 14:01:01
55
* @Last Modified by: nguyen
6-
* @Last Modified time: 2020-05-19 18:55:34
6+
* @Last Modified time: 2020-06-22 18:55:34
77
*/ -->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
9-
<default>
10-
<magepow_speedoptimizer>
9+
<default>
10+
<magepow_speedoptimizer>
1111
<general>
1212
<enabled>1</enabled>
1313
<loading_body>0</loading_body>
@@ -17,14 +17,15 @@
1717
<regex_block><![CDATA[<main id="maincontent"]]></regex_block>
1818
<lazy_ajax>0</lazy_ajax>
1919
<minify_html>1</minify_html>
20-
<defer_js>1</defer_js>
20+
<defer_js>0</defer_js>
2121
<body_includes><![CDATA[
2222
<script type="text/javascript">
2323
require(["jquery", "magepow/lazyload", "domReady!"], function($, lazyload){
2424
var imgLazy = $('img.lazyload').not(".loaded");
2525
imgLazy.lazyload();
2626
imgLazy.on('load',function(){
2727
var img = $(this);
28+
if(img.hasClass( "loaded" )) return;
2829
if(img.attr('src') == img.data('src')){img.addClass('loaded');}
2930
else {img.lazyload();}
3031
if($.equalheight) $.fn.equalheight();
@@ -33,6 +34,7 @@
3334
var lazy = $(this).find("img.lazyload").not(".loaded").lazyload();
3435
lazy.on('load',function(){
3536
var img = $(this);
37+
if(img.hasClass( "loaded" )) return;
3638
if(img.attr('src') == img.data('src')){img.addClass('loaded');}
3739
else {img.lazyload();}
3840
if($.equalheight) $.fn.equalheight();
@@ -44,5 +46,5 @@
4446
</body_includes>
4547
</general>
4648
</magepow_speedoptimizer>
47-
</default>
49+
</default>
4850
</config>

0 commit comments

Comments
 (0)