aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--global-functions.rsc3
1 files changed, 3 insertions, 0 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 54dcb68..4f37fa5 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -382,6 +382,9 @@
:set EitherOr do={
:global IfThenElse;
+ :if ([ :typeof $1 ] = "bool") do={
+ :return $1;
+ }
:if ([ :typeof $1 ] = "num") do={
:return [ $IfThenElse ($1 != 0) $1 $2 ];
}