Skip to content

List locations can be null #69

@wbazant

Description

@wbazant

A list with no locations has null locations instead of an empty list.

Not high priority, I've worked around it in the frontend:

-      state.lists = action.payload                                                                                                                                                           
+      state.lists = action.payload.map((list) => ({                                                                                                                                          
+        ...list,                                                                                                                                                                             
+        locations: list.locations ?? [],                                                                                                                                                     
+      }))   

but the schema technically doesn't allow a nullable list so filing a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions