Fix partial lookup
This commit is contained in:
parent
07ac578a31
commit
c3492b1f7b
|
@ -124,7 +124,7 @@ module Middleman
|
|||
# @return [String]
|
||||
Contract String => Maybe[IsA['Middleman::SourceFile']]
|
||||
def locate_partial(partial_path)
|
||||
return unless resource = sitemap.find_resource_by_path(current_path)
|
||||
return unless resource = sitemap.find_resource_by_destination_path(current_path)
|
||||
|
||||
# Look for partials relative to the current path
|
||||
current_dir = resource.source_file[:relative_path].dirname
|
||||
|
|
|
@ -92,7 +92,7 @@ module Middleman
|
|||
self.class.new(data)
|
||||
elsif data.is_a? Array
|
||||
data.map(&method(:recursively_enhance)).freeze
|
||||
elsif data.frozen? || data.nil?
|
||||
elsif data.frozen? || data.nil? || [::TrueClass, ::FalseClass].include?(data.class)
|
||||
data
|
||||
else
|
||||
data.dup.freeze
|
||||
|
|
Loading…
Reference in a new issue