From 99c004d41f5d0fbfb931d5125ad6bb363f7c0071 Mon Sep 17 00:00:00 2001 From: Eric Skogen Date: Mon, 12 Dec 2011 12:12:19 -0600 Subject: [PATCH] fix bug in sitemap_tree which referred to app out of context --- lib/middleman/extensions/sitemap_tree.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/middleman/extensions/sitemap_tree.rb b/lib/middleman/extensions/sitemap_tree.rb index 31b33867..7105ef15 100644 --- a/lib/middleman/extensions/sitemap_tree.rb +++ b/lib/middleman/extensions/sitemap_tree.rb @@ -16,7 +16,7 @@ module Middleman::Extensions if !@sitemap_tree_cache.has_key?(key) auto_hash = Hash.new{ |h,k| h[k] = Hash.new &h.default_proc } - app.sitemap.all_paths.each do |path| + sitemap.all_paths.each do |path| next if !regex.nil? && !path.match(regex) sub = auto_hash path.split( "/" ).each{ |dir| sub[dir]; sub = sub[dir] }