Add basic types
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2019 New Vector Ltd
|
||||
Copyright 2019-2021 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -36,8 +36,8 @@ function log(msg) {
|
||||
console.log(`StorageManager: ${msg}`);
|
||||
}
|
||||
|
||||
function error(msg) {
|
||||
console.error(`StorageManager: ${msg}`);
|
||||
function error(msg, ...args) {
|
||||
console.error(`StorageManager: ${msg}`, ...args);
|
||||
}
|
||||
|
||||
function track(action) {
|
||||
@@ -73,7 +73,7 @@ export async function checkConsistency() {
|
||||
dataInLocalStorage = localStorage.length > 0;
|
||||
log(`Local storage contains data? ${dataInLocalStorage}`);
|
||||
|
||||
cryptoInited = localStorage.getItem("mx_crypto_initialised");
|
||||
cryptoInited = !!localStorage.getItem("mx_crypto_initialised");
|
||||
log(`Crypto initialised? ${cryptoInited}`);
|
||||
} else {
|
||||
healthy = false;
|
||||
|
||||
Reference in New Issue
Block a user