mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-20 10:57:51 +02: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…
Add table
Add a link
Reference in a new issue