Restore indifferent-access behavior to page data and fix broken caching
This commit is contained in:
parent
bb2f40cc72
commit
137ce94d23
|
@ -40,7 +40,7 @@ module Middleman::CoreExtensions
|
||||||
data[opt] = fmdata[opt] unless fmdata[opt].nil?
|
data[opt] = fmdata[opt] unless fmdata[opt].nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
{ :options => data, :page => fmdata }
|
{ :options => data, :page => ::Middleman::Util.recursively_enhance(fmdata).freeze }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -199,15 +199,8 @@ module Middleman::CoreExtensions
|
||||||
end
|
end
|
||||||
|
|
||||||
def data
|
def data
|
||||||
@_last_raw ||= nil
|
::Middleman::Util.recursively_enhance(raw_data).freeze
|
||||||
@_last_enhanced ||= nil
|
|
||||||
|
|
||||||
if @_last_raw != raw_data
|
|
||||||
@_last_raw == raw_data
|
|
||||||
@_last_enhanced = ::Middleman::Util.recursively_enhance(raw_data).freeze
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
module InstanceMethods
|
module InstanceMethods
|
||||||
|
|
Loading…
Reference in a new issue