fix errors
This commit is contained in:
parent
5c7a1f66d6
commit
d6857a1ede
2 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ async function getLoginData(username, password) {
|
|||
const storedCredentials = localStorage.getItem("morpheus_login");
|
||||
if (!storedCredentials) {
|
||||
const api = new Network(HOMESERVER);
|
||||
loginData = await api.passwordLogin(username, password).response();
|
||||
const loginData = await api.passwordLogin(username, password).response();
|
||||
localStorage.setItem("morpheus_login", JSON.stringify(loginData));
|
||||
return loginData;
|
||||
} else {
|
||||
|
|
|
@ -10,8 +10,8 @@ export function openDatabase(name, createObjectStore, version = undefined) {
|
|||
|
||||
export function reqAsPromise(req) {
|
||||
return new Promise((resolve, reject) => {
|
||||
txn.addEventListener("success", event => resolve(event.target.result));
|
||||
txn.addEventListener("error", event => reject(event.target.error));
|
||||
req.addEventListener("success", event => resolve(event.target.result));
|
||||
req.addEventListener("error", event => reject(event.target.error));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue