-
Notifications
You must be signed in to change notification settings - Fork 11
Description
The createSelectElementFromMapFactory
creates selectors to select basic elements (patients, vehicle, personnel, …) from the state based on their UUID. The created selectors contain an assertion that the element is defined. This is not accurate, as for example, one might still have the UUID of an already deleted element.
Even defensive code does not protect against access to undefined values in these cases. For example, in the user interface added in #1076, one can trigger access to undefined
by deleting a simulated region while its opened in the IFS modal. Although the modal switches back to the overview tab if a region does not exist any longer, the observables on the simulated region already trigger with the new value (undefined
), thus causing some errors printed to the console.
Changing the type definition to be more accurate might require bigger changes, as the base selectors created by createSelectElementFromMapFactory
are used in many places and also as the base for many other selectors.