diff --git a/lib/webpacker/commands.rb b/lib/webpacker/commands.rb index e7a97b15b..d384218be 100644 --- a/lib/webpacker/commands.rb +++ b/lib/webpacker/commands.rb @@ -23,7 +23,7 @@ def clean(count = 2, age = 3600) .each_with_index .drop_while do |(mtime, _), index| max_age = [0, Time.now - Time.at(mtime)].max - max_age < age && index < count + max_age < age || index < count end .each do |(_, files), index| files.each do |file|