Skip to content

Commit

Permalink
Load minified files if the main is .min
Browse files Browse the repository at this point in the history
  • Loading branch information
AmauriC committed Jan 17, 2024
1 parent 00a6e3c commit ce1d4ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tarteaucitron.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ var tarteaucitron = {
"use strict";
var cdn = tarteaucitron.cdn,
language = tarteaucitron.getLanguage(),
useMinifiedJS = ((cdn.indexOf('cdn.jsdelivr.net') >= 0) || (tarteaucitronUseMin !== '')),
useMinifiedJS = ((cdn.indexOf('cdn.jsdelivr.net') >= 0) || (path.indexOf('.min.') >= 0) || (tarteaucitronUseMin !== '')),
pathToLang = cdn + 'lang/tarteaucitron.' + language + (useMinifiedJS ? '.min' : '') + '.js',
pathToServices = cdn + 'tarteaucitron.services' + (useMinifiedJS ? '.min' : '') + '.js',
linkElement = document.createElement('link'),
Expand Down
2 changes: 1 addition & 1 deletion tarteaucitron.min.js

Large diffs are not rendered by default.

0 comments on commit ce1d4ad

Please sign in to comment.