You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Operations on a list[T] | None var throw when the value is None #7826
Operations on a list[T] | None var that holds None throw on the frontend. #7800 fixes the same defect for set[T] | None (SetVar). Optional lists still have it.
TypeError: Cannot read properties of null (reading 'includes')
length() fails the same way (null.length). The prod prerender fails for the same reason.
Expected
A None list acts as an empty list: contains is false and length is 0. This is the rule that #7800 uses for optional sets.
Suggested fix
Give an optional ArrayVar the same null-safe view that #7800 adds to SetVar.to_array(), which compiles to (x ?? []). Use that view in the array operations.
Activity
linear-code commentedon Nov 11, 2026
ENG-13965
Treat None as an empty list in optional ArrayVar operations; type opt…
Treat None as empty in optional set and list var operations (#7800)
Treat None as empty in optional set and list var operations (reflex-d…