fix(ui): properly handle boolean json responses (#3626)
This commit is contained in:
parent
a995e578fa
commit
6efc687036
5 changed files with 18 additions and 17 deletions
|
|
@ -81,10 +81,10 @@
|
|||
body: JSON.stringify(this.passwordData),
|
||||
}).then((r) => {
|
||||
this.loading = false;
|
||||
if (r.status == 200) {
|
||||
if (r.status === 200) {
|
||||
r.json().then((rj) => {
|
||||
if (rj.status.toString() === "true") {
|
||||
this.success = true;
|
||||
this.success = rj.status;
|
||||
if (this.success === true) {
|
||||
setTimeout(() => {
|
||||
document.location.reload();
|
||||
}, 5000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue