Skip to content

Commit

Permalink
Fixed minif. detection when fontawesom loaded from local (close #1).
Browse files Browse the repository at this point in the history
  • Loading branch information
tangar76 committed Jan 22, 2020
1 parent cc015e3 commit b997955
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions view/adminhtml/web/js/form/element/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,17 @@ define([
*/
function isMinificationEnabled(minficationPostfix) {
var baseUrl = window.location.origin,
href;
isEnabled = true;

href = $('link[type="text/css"][href^="' + baseUrl + '"]').attr('href');
$('link[type="text/css"][href^="' + baseUrl + '"]').each(function () {
if ($(this).attr('href').indexOf(minficationPostfix) < 0) {
isEnabled = false;

return href.indexOf(minficationPostfix) > 0;
return false;
}
});

return isEnabled;
}

/**
Expand Down

0 comments on commit b997955

Please sign in to comment.