Skip to content

Commit c00d34d

Browse files
committed
add is none
1 parent 3de33bd commit c00d34d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

reflex/vars/base.py

+10
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,16 @@ def bool(self) -> BooleanVar:
10641064

10651065
return boolify(self)
10661066

1067+
def is_none(self) -> BooleanVar:
1068+
"""Check if the var is None.
1069+
1070+
Returns:
1071+
A BooleanVar object representing the result of the check.
1072+
"""
1073+
from .number import is_not_none_operation
1074+
1075+
return ~is_not_none_operation(self)
1076+
10671077
def is_not_none(self) -> BooleanVar:
10681078
"""Check if the var is not None.
10691079

0 commit comments

Comments
 (0)