From 3d4ddca76a03b53a9ecf65b3b15513c6b418f07d Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Tue, 31 Jan 2012 04:12:36 -0500 Subject: [PATCH] strip nils --- lib/compass/sass_extensions/sprites/image.rb | 2 +- lib/compass/sprite_importer.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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