mirror of
https://github.com/rubjo/victor-mono.git
synced 2026-08-24 10:14:36 -05:00
Update Sample-desktop.js
This commit is contained in:
@@ -7,7 +7,7 @@ async function getUser() {
|
||||
user = await loadJson(`https://my.api.com/users/${name}`)
|
||||
break // No error, exit loop and proceed
|
||||
} catch (err) {
|
||||
if (err.response.status === 404) {
|
||||
if (err.response && err.response.status === 404) {
|
||||
// Loop will continue after the alert
|
||||
alert(`User "${name} not found, please reenter.`)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user