lib/contentful_middleman/mappers/base.rb in contentful_middleman-1.4.2 vs lib/contentful_middleman/mappers/base.rb in contentful_middleman-1.5.0
- old
+ new
@@ -86,13 +86,11 @@
end
def map_entry(entry)
context = Context.new
context.id = entry.id
- if !@children[:discovered].include?(entry.id)
- @children[:queue].push({ :context => context, :entry => entry})
- @children[:discovered].push(entry.id)
- end
+ @children[:discovered].push(entry.id) unless @children[:discovered].include?(entry.id)
+ @children[:queue].push({ :context => context, :entry => entry})
context
end
def map_location(location)
location.properties