mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
possible fix is-false/true logic
This commit is contained in:
parent
90c9d8b5a6
commit
e70e13e265
1 changed files with 4 additions and 0 deletions
|
@ -491,6 +491,8 @@ function show-call-stack() {
|
||||||
# @see as-boolean
|
# @see as-boolean
|
||||||
function is-true() {
|
function is-true() {
|
||||||
as-boolean "${1:-}" && return 0
|
as-boolean "${1:-}" && return 0
|
||||||
|
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# @description Helper function see if $1 could be considered falsey
|
# @description Helper function see if $1 could be considered falsey
|
||||||
|
@ -498,6 +500,8 @@ function is-true() {
|
||||||
# @see as-boolean
|
# @see as-boolean
|
||||||
function is-false() {
|
function is-false() {
|
||||||
as-boolean "${1:-}" || return 0
|
as-boolean "${1:-}" || return 0
|
||||||
|
|
||||||
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# @description Helper function see if $1 could be truethy or falsey.
|
# @description Helper function see if $1 could be truethy or falsey.
|
||||||
|
|
Loading…
Reference in a new issue