diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-12-16 13:25:31 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-12-16 13:25:31 +0000 |
commit | db50779030f36673f8b63d1209e149d1ce34ba11 (patch) | |
tree | fb85105b9f41a79743b9556d725bdeb0c794d1b7 /perllib/FixMyStreet/App/View | |
parent | fd263bf98521d8576fae5c39d617eb5a2ae3d160 (diff) |
Fix use of .auto.min.js files.
fddf7f95 broke the use of minimized JS files, because it always used an
unchanged $url in the output. Make sure it is updated if $file is.
Diffstat (limited to 'perllib/FixMyStreet/App/View')
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index 22387f5f6..b73fa82ef 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -147,7 +147,7 @@ sub version { # See if there's an auto.min.js version and use that instead if there is (my $file_min = $file) =~ s/\.js$/.auto.min.js/; _version_get_mtime($file_min); - $file = $file_min if $version_hash{$file_min} >= $version_hash{$file}; + $url = $file = $file_min if $version_hash{$file_min} >= $version_hash{$file}; } my $admin = $self->template->context->stash->{admin} ? FixMyStreet->config('ADMIN_BASE_URL') : ''; return "$admin$url?$version_hash{$file}"; |