lib/frontman/sitemap_tree.rb in frontman-ssg-0.0.4 vs lib/frontman/sitemap_tree.rb in frontman-ssg-0.1.0
- old
+ new
@@ -38,12 +38,10 @@
unless existing_resource.nil?
raise DuplicateResourceError.create(resource, url, existing_resource)
end
- if Frontman::App.instance.get_redirect(url)
- raise ExistingRedirectError.create(resource, url)
- end
+ raise ExistingRedirectError.create(resource, url) if Frontman::App.instance.get_redirect(url)
SitemapTree.resources.push(resource)
parts = url.split('/')
used_parts = []
add_parts(parts, used_parts, resource)