mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $EitherOr: properly handle time values
This commit is contained in:
parent
2a10f43acc
commit
5349c9b52e
1 changed files with 3 additions and 0 deletions
|
@ -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 ];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue