Починить критичные баги в JS

remotes/origin/hotfix/js-error
gzbender 7 years ago
parent 37d9299897
commit 3f42e025bb
  1. 7
      project/templates/blocks/lil_store_js.html
  2. 11
      project/templates/lilcity/layer.html

@ -39,12 +39,13 @@
isGiftCertificateUrl: {{ is_gift_certificate_url|yesno:"true,false" }},
},
data: {},
urlIs: (urlPatternNames) => {
urlIs: function(urlPatternNames) {
if(! Array.isArray(urlPatternNames)){
urlPatternNames = [urlPatternNames];
}
return urlPatternNames.filter(
urlPatternName => window.location.pathname.search(window.LIL_STORE.urls[urlPatternName]) > -1).length > 0;
return urlPatternNames.filter(function(urlPatternName){
return window.location.pathname.search(window.LIL_STORE.urls[urlPatternName]) > -1;
}).length > 0;
},
isIndexPage: window.location.pathname == '/',
};

@ -48,6 +48,12 @@
}
</script>
{% block layer_head %}{% endblock layer_head %}
</head>
<body>
{% block layer_body %}
{% endblock layer_body %}
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
@ -106,10 +112,5 @@
<noscript><div><img src="https://mc.yandex.ru/watch/49354039" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
{% include "templates/blocks/mixpanel.html" %}
{% block layer_head %}{% endblock layer_head %}
</head>
<body>
{% block layer_body %}
{% endblock layer_body %}
</body>
</html>

Loading…
Cancel
Save