Skip to content

Commit a80ead7

Browse files
committed
allow the fallback_value to be a boolean false value.
1 parent 4eb662e commit a80ead7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/mixin/__FCMBase.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ and get a default return value in that case.
2828
]]
2929
function methods:_FallbackCall(method_name, fallback_value, ...)
3030
if not self[method_name] then
31-
return fallback_value or self
31+
if fallback_value ~= nil then
32+
return fallback_value
33+
end
34+
return self
3235
end
3336

3437
return self[method_name](self, ...)

0 commit comments

Comments
 (0)