Return false if no false value is provided.
This commit is contained in:
parent
2cff4cc775
commit
d4a0484922
@ -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