Files
ThreadNet-Web/src/vector/localstorage-fix.ts
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
556 B
TypeScript
Raw Normal View History

2024-10-15 14:57:26 +01:00
/*
Copyright 2024 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
/**
* Because we've been saving a lot of additional logger data in the localStorage for no particular reason
* we need to, hopefully, unbrick user's devices by geting rid of unnecessary data.
* */
if (window.localStorage) {
Object.keys(window.localStorage).forEach((key) => {
2024-07-31 11:03:18 +01:00
if (key.startsWith("loglevel:")) {
window.localStorage.removeItem(key);
}
});
}