diff --git a/lib/compass/sass_extensions/sprites/image.rb b/lib/compass/sass_extensions/sprites/image.rb index 3bd7e0d6..4ee6a186 100644 --- a/lib/compass/sass_extensions/sprites/image.rb +++ b/lib/compass/sass_extensions/sprites/image.rb @@ -26,7 +26,7 @@ module Compass end def find_file - Compass.configuration.sprite_load_path.each do |path| + Compass.configuration.sprite_load_path.compact.each do |path| f = File.join(path, relative_file) if File.exists?(f) return f diff --git a/lib/compass/sprite_importer.rb b/lib/compass/sprite_importer.rb index 670f9323..c1b9cdc0 100644 --- a/lib/compass/sprite_importer.rb +++ b/lib/compass/sprite_importer.rb @@ -74,7 +74,7 @@ module Compass # Returns the Glob of image files for the uri def self.files(uri) - Compass.configuration.sprite_load_path.each do |folder| + Compass.configuration.sprite_load_path.compact.each do |folder| files = Dir[File.join(folder, uri)].sort next if files.empty? return files