Take a bit more care when checking if a view file exists.
This commit is contained in:
parent
621825b36c
commit
fe9a5ece32
|
@ -34,8 +34,8 @@ module Middleman::Features::DefaultHelpers
|
|||
path = path.gsub(File.extname(path), ".#{asset_ext}")
|
||||
path = path.gsub("/", separator)
|
||||
|
||||
views = Dir[File.join(self.class.views, asset_dir, "#{path}*")]
|
||||
yield path if views.any?
|
||||
view = File.join(self.class.views, asset_dir, path)
|
||||
yield path if File.exists?(view) or Dir["#{view}.*"].any?
|
||||
end
|
||||
|
||||
def page_classes
|
||||
|
|
Loading…
Reference in a new issue