Skip to content

Commit

Permalink
minifyRequired always returns true if output file doesn't exist even …
Browse files Browse the repository at this point in the history
…in production
  • Loading branch information
nickdekruijk committed Feb 16, 2020
1 parent eae1a34 commit cdbee43
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ class Minify
{
private static function minifyRequired($files, $output, $paths)
{
if (in_array(app()->environment(), config('minify.skip_environment'))) {
return false;
}
if (!file_exists(public_path($output))) {
return true;
}
if (in_array(app()->environment(), config('minify.skip_environment'))) {
return false;
}
$filemtime = filemtime(public_path($output));
foreach ((array) $files as $file) {
if (!self::isUrl($file) && filemtime(self::findFile($file, $paths)) > $filemtime) {
Expand Down

0 comments on commit cdbee43

Please sign in to comment.