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
|
|
@ -42,7 +42,7 @@
|
|||
fetch("./api/pin", {method: "POST", body: b})
|
||||
.then((response) => response.json())
|
||||
.then((response) => {
|
||||
if (response.status.toString().toLowerCase() === "true") {
|
||||
if (response.status === true) {
|
||||
document.querySelector(
|
||||
"#status"
|
||||
).innerHTML = `<div class="alert alert-success" role="alert">${this.i18n.t('pin.pair_success')}</div>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue