mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
global-functions: $EitherOr: properly handle time values
This commit is contained in:
@@ -309,6 +309,9 @@
|
||||
:if ([ :typeof $1 ] = "num") do={
|
||||
:return [ $IfThenElse ($1 != 0) $1 $2 ];
|
||||
}
|
||||
:if ([ :typeof $1 ] = "time") do={
|
||||
:return [ $IfThenElse ($1 > 0s) $1 $2 ];
|
||||
}
|
||||
:return [ $IfThenElse ([ :len [ :tostr $1 ] ] > 0) $1 $2 ];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user