From 2c90198adeba5afc326aae6d7029b6530cea9e97 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Mon, 2 Aug 2021 19:38:08 -0600 Subject: [PATCH] Add null check for authState --- src/add-auth/react-ts/src/Home.tsx | 2 +- src/add-auth/react/src/Home.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-auth/react-ts/src/Home.tsx b/src/add-auth/react-ts/src/Home.tsx index 48fc1888..dcdac15e 100644 --- a/src/add-auth/react-ts/src/Home.tsx +++ b/src/add-auth/react-ts/src/Home.tsx @@ -30,7 +30,7 @@ export default withOktaAuth(class Home extends Component { render() { let body = null; - if (this.props.authState.isAuthenticated) { + if (this.props.authState?.isAuthenticated) { body = (
diff --git a/src/add-auth/react/src/Home.js b/src/add-auth/react/src/Home.js index efa41b43..adc06f87 100644 --- a/src/add-auth/react/src/Home.js +++ b/src/add-auth/react/src/Home.js @@ -20,7 +20,7 @@ export default withOktaAuth(class Home extends Component { render() { let body = null; - if (this.props.authState.isAuthenticated) { + if (this.props.authState?.isAuthenticated) { body = (