Skip to content

Commit

Permalink
Resolved Issue of Error in Switching URL if CORS Error Occurred (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyowen committed Jun 6, 2021
1 parent 877d574 commit b8fe501
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ export default function App() {
await axios.get(`${server_list[a]}/status`)
.then(() => setServer(server_list[a]))
.catch(err => {
if(err.response.status >= 500 && server_list[a+1]) ping(a+1)
if((err.response && err.response.status >= 500) && server_list[a+1]) ping(a+1)
else if(!err.response && server_list[a+1]) ping(a+1)
})
}

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/login.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Login = ({ userData }) => {
const {server: SERVER_URL} = userData
const {mfa} = userData.type
const {email} = userData.credentials
const next = new URLSearchParams(window.location.search).get('next')
const next = new URLSearchParams(window.location.search).get('next').toString()
const [properties, setProperties] = useState({
honeypot: '',
verify: false,
Expand Down

0 comments on commit b8fe501

Please sign in to comment.