From cfd1cd0797c761889de48363f16674281963bb5a Mon Sep 17 00:00:00 2001 From: dannyrb Date: Thu, 9 May 2019 16:07:21 -0400 Subject: [PATCH] Only set a userManager if we have a non-empty oidc array --- src/App.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/App.js b/src/App.js index 9ec2fa3d7..d15b9be28 100644 --- a/src/App.js +++ b/src/App.js @@ -89,13 +89,14 @@ class App extends Component { store.dispatch(buttonsAction) - // - const firstOpenIdClient = this.props.oidc[0] + if (this.props.oidc.length) { + const firstOpenIdClient = this.props.oidc[0] - this.userManager = getUserManagerForOpenIdConnectClient( - store, - firstOpenIdClient - ) + this.userManager = getUserManagerForOpenIdConnectClient( + store, + firstOpenIdClient + ) + } handleServers(this.props.servers) initWebWorkers( this.props.routerBasename,