[email protected] or @azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]@azure/[email protected]In all examples calling getAllAccounts() there is a check for null done, see here. But the type defined is not defined as nullable (as can be seen in IPublicClientApplication interface).
It would be helpful to know, through typing as well, that the result can be null, or if that is not the case, to adapt the examples to match the current behaviour.
@Calamari Thanks for pointing this out, looks like the sample needs to be updated. getAllAccounts will return an empty array if no accounts are found.
@derisen Could you please update the samples to check for currentAccounts.length === 0 instead of null?
Closing as the samples have been updated
Most helpful comment
@Calamari Thanks for pointing this out, looks like the sample needs to be updated.
getAllAccountswill return an empty array if no accounts are found.@derisen Could you please update the samples to check for
currentAccounts.length === 0instead ofnull?