Skip to content

Commit

Permalink
Fix start page resolution from null options.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Dec 13, 2023
1 parent bc5560c commit 84f81b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class LoginClient {

const userConfigurationScreenUrl = new URL('/settings', this.hostUrl);
userConfigurationScreenUrl.searchParams.set('client_id', this.settings.applicationId);
userConfigurationScreenUrl.searchParams.set('start_page', options?.startPage || 'Profile');
userConfigurationScreenUrl.searchParams.set('start_page', options && options.startPage || 'Profile');
userConfigurationScreenUrl.searchParams.set('redirect_uri', options && options.redirectUrl || window.location.href);
window.location.assign(userConfigurationScreenUrl.toString());
await Promise.resolve();
Expand Down

0 comments on commit 84f81b1

Please sign in to comment.