Restore indifferent-access behavior to page data and fix broken caching

This commit is contained in:
Ben Hollis 2013-02-05 23:34:18 -08:00
parent bb2f40cc72
commit 137ce94d23

View file

@ -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