diff --git a/packages/guard-shim-react18/package.json b/packages/guard-shim-react18/package.json index 2495f061..583c8398 100644 --- a/packages/guard-shim-react18/package.json +++ b/packages/guard-shim-react18/package.json @@ -25,7 +25,7 @@ "webpack": "^5.72.0" }, "dependencies": { - "@authing/react18-ui-components": "4.5.40-alpha.19", + "@authing/react18-ui-components": "4.5.40-alpha.20", "react": "^18.0.0", "react-dom": "^18.0.0" }, diff --git a/packages/guard-shim-react18/src/index.tsx b/packages/guard-shim-react18/src/index.tsx index ef7d239d..f5b7b56f 100644 --- a/packages/guard-shim-react18/src/index.tsx +++ b/packages/guard-shim-react18/src/index.tsx @@ -227,28 +227,23 @@ export class Guard { * @returns Promise */ async start(el?: string | HTMLElement, visible?: boolean): Promise { - try { - ;(this.options.config as Partial).target = el + ;(this.options.config as Partial).target = el - this.visible = visible ?? this.visible + this.visible = visible ?? this.visible - this.render() + this.render() - const userInfo = await this.trackSession() + const userInfo = await this.trackSession() - if (userInfo) { - return Promise.resolve(userInfo) - } + if (userInfo) { + return Promise.resolve(userInfo) + } - return new Promise(resolve => { - this.on('login', (userInfo: User) => { - resolve(userInfo) - }) + return new Promise(resolve => { + this.on('login', (userInfo: User) => { + resolve(userInfo) }) - } catch (e) { - console.log(e) - throw new Error(`error ${e}`) - } + }) } startRegister() { diff --git a/packages/guard/package.json b/packages/guard/package.json index a7892378..9e140ed2 100644 --- a/packages/guard/package.json +++ b/packages/guard/package.json @@ -23,7 +23,7 @@ "webpack": "^5.72.0" }, "dependencies": { - "@authing/react-ui-components": "4.5.40-alpha.19", + "@authing/react-ui-components": "4.5.40-alpha.20", "axios": "^0.27.2", "react": "^16.14.0", "react-dom": "^16.14.0"