fix(ui): properly handle boolean json responses (#3626)
This commit is contained in:
@@ -94,10 +94,10 @@
|
||||
method: "POST",
|
||||
body: JSON.stringify(this.passwordData),
|
||||
}).then((r) => {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user