Update github actions
This commit is contained in:
24
src/main.ts
24
src/main.ts
@@ -4,6 +4,7 @@ import App from "./App.svelte";
|
||||
import { loadData } from "./ts/storage/globalApi";
|
||||
import { initHotkey } from "./ts/hotkey";
|
||||
import { polyfill } from "./ts/polyfill";
|
||||
import { preLoadCheck } from "./preload";
|
||||
|
||||
const errorHandler = (event: ErrorEvent) => {
|
||||
console.error(event.error)
|
||||
@@ -23,18 +24,21 @@ export const removeDefaultHandler = () => {
|
||||
}
|
||||
|
||||
let app: App;
|
||||
try {
|
||||
polyfill()
|
||||
|
||||
app = new App({
|
||||
target: document.getElementById("app"),
|
||||
});
|
||||
if(preLoadCheck()){
|
||||
try {
|
||||
polyfill()
|
||||
|
||||
loadData()
|
||||
initHotkey()
|
||||
} catch (error) {
|
||||
console.error(error, error.stack)
|
||||
alert(error)
|
||||
app = new App({
|
||||
target: document.getElementById("app"),
|
||||
});
|
||||
|
||||
loadData()
|
||||
initHotkey()
|
||||
} catch (error) {
|
||||
console.error(error, error.stack)
|
||||
alert(error)
|
||||
}
|
||||
}
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user