Skip to content

Commit

Permalink
javascript console errors - challenge.gov #1434
Browse files Browse the repository at this point in the history
  • Loading branch information
kkrug committed Sep 23, 2024
1 parent cc1fa08 commit 8b10c3e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions assets/client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ const renderRouter = () => (
)

const rootElement = document.getElementById('challenge-gov-react-app')
const apiUrl = encodeURI(rootElement.getAttribute('data-api-url'))
const publicUrl = rootElement.getAttribute('data-public-url')
const imageBase = encodeURI(rootElement.getAttribute('data-image-base'))
const bridgeApplyBlocked = rootElement.getAttribute('data-bridge-apply-blocked') != 'false'

ReactDOM.render(renderRouter(), rootElement);
if (rootElement){
const apiUrl = encodeURI(rootElement.getAttribute('data-api-url'))
const publicUrl = rootElement.getAttribute('data-public-url')
const imageBase = encodeURI(rootElement.getAttribute('data-image-base'))
const bridgeApplyBlocked = rootElement.getAttribute('data-bridge-apply-blocked') != 'false'
ReactDOM.render(renderRouter(), rootElement);
}

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
Expand Down

0 comments on commit 8b10c3e

Please sign in to comment.