Return false if no false value is provided.
This commit is contained in:
parent
0334af1234
commit
795800a85f
@ -1,9 +1,9 @@
|
|||||||
module Compass::SassExtensions::Functions::If
|
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 truth.to_bool
|
||||||
if_true
|
if_true
|
||||||
else
|
else
|
||||||
if_false
|
if_false || Sass::Script::Bool.new(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user