lib/percy/capybara/loaders/native_loader.rb in percy-capybara-0.4.12 vs lib/percy/capybara/loaders/native_loader.rb in percy-capybara-0.5.0

- old
+ new

@@ -146,9 +146,12 @@ # Make the resource URL absolute to the current page. If it is already absolute, this # will have no effect. resource_url = URI.join(page.current_url, image_url).to_s + # Skip duplicates. + next if resources.find { |r| r.resource_url == resource_url } + next if !_should_include_url?(resource_url) # Fetch the images. # TODO(fotinakis): this can be pretty inefficient for image-heavy pages because the # browser has already loaded them once and this fetch cannot easily leverage the