fix settings initialization
This commit is contained in:
parent
2976d438d9
commit
0106b445b5
1 changed files with 2 additions and 1 deletions
|
@ -9,7 +9,8 @@ import { AdapterElement } from "./adapter-element"
|
|||
import { ThreadSummaryElement } from "./thread-summary-element"
|
||||
|
||||
function main() {
|
||||
Settings._instance = <Settings>JSON.parse(localStorage.getItem("settings") ?? "{}");
|
||||
const saveData = localStorage.getItem("settings");
|
||||
Settings._instance = saveData ? <Settings>JSON.parse(saveData) : new Settings();
|
||||
|
||||
customElements.define("underbbs-tabbar", TabBarElement);
|
||||
customElements.define("underbbs-message", MessageElement);
|
||||
|
|
Loading…
Reference in a new issue