mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
over calling change callbacks which are unnecessary.
This commit is contained in:
parent
ef0b996004
commit
eb1a658b25
3 changed files with 4 additions and 4 deletions
|
@ -146,9 +146,9 @@ module Middleman
|
|||
# Get the URL path for an on-disk file
|
||||
# @param [String] file
|
||||
# @return [String]
|
||||
Contract IsA['Middleman::SourceFile'] => String
|
||||
Contract Or[Pathname, IsA['Middleman::SourceFile']] => String
|
||||
def file_to_path(file)
|
||||
relative_path = file[:relative_path].to_s
|
||||
relative_path = file.is_a?(Pathname) ? file.to_s : file[:relative_path].to_s
|
||||
|
||||
# Replace a file name containing automatic_directory_matcher with a folder
|
||||
unless @app.config[:automatic_directory_matcher].nil?
|
||||
|
|
|
@ -339,7 +339,7 @@ module Middleman
|
|||
valid_updated = updated_files.select { |f| f[:types].include?(callback[:type]) }
|
||||
valid_removed = removed_files.select { |f| f[:types].include?(callback[:type]) }
|
||||
|
||||
callback[:proc].call(valid_updated, valid_removed)
|
||||
callback[:proc].call(valid_updated, valid_removed) unless valid_updated.empty? && valid_removed.empty?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module Middleman
|
||||
# Current Version
|
||||
# @return [String]
|
||||
VERSION = '4.0.0.alpha.4' unless const_defined?(:VERSION)
|
||||
VERSION = '4.0.0.alpha.5' unless const_defined?(:VERSION)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue