wrobins / cordova-plugin-msal

Use the newest Microsoft MSAL library in your Cordova-based project!
Apache License 2.0
23 stars 63 forks source link

nullcheck appMultiClient to avoid getAccounts nul #28

Closed johnathon101 closed 4 years ago

johnathon101 commented 4 years ago

appMultipleClient is null when accountMode is SINGLE. When getAccounts() was called in SINGLE mode the app throws: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.List com.microsoft.identity.client.IMultipleAccountPublicClientApplication.getAccounts()' on a null object reference. found boolean is used within the loop to alert the user the requested account was not found in scope, so it can be instantiated only when appMultipleClient is a valid object

wrobins commented 4 years ago

Thanks for your contribution! I'll release a revision with your fixes.