Return false if no false value is provided.

This commit is contained in:
Chris Eppstein 2010-11-15 03:47:57 -08:00
parent 0334af1234
commit 795800a85f

View File

@ -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