From d4a048492252a8a27d90de33a690aedbcafe2c14 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Mon, 15 Nov 2010 03:47:57 -0800 Subject: [PATCH] Return false if no false value is provided. --- lib/compass/sass_extensions/functions/if.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/compass/sass_extensions/functions/if.rb b/lib/compass/sass_extensions/functions/if.rb index 98c1591d..9f599de4 100644 --- a/lib/compass/sass_extensions/functions/if.rb +++ b/lib/compass/sass_extensions/functions/if.rb @@ -1,9 +1,9 @@ module Compass::SassExtensions::Functions::If - def if(truth, if_true, if_false) + def if(truth, if_true, if_false = nil) if truth.to_bool if_true else - if_false + if_false || Sass::Script::Bool.new(false) end end end