Add JavaScript disabled message and error handling to app div
This commit is contained in:
22
src/main.ts
22
src/main.ts
@@ -6,14 +6,20 @@ import { initHotkey } from "./ts/hotkey";
|
||||
import { polyfill } from "./ts/polyfill";
|
||||
import { watchParamButton } from "./ts/plugins/embedscript";
|
||||
|
||||
polyfill()
|
||||
let app: App;
|
||||
try {
|
||||
polyfill()
|
||||
|
||||
const app = new App({
|
||||
target: document.getElementById("app"),
|
||||
});
|
||||
|
||||
loadData()
|
||||
initHotkey()
|
||||
watchParamButton()
|
||||
app = new App({
|
||||
target: document.getElementById("app"),
|
||||
});
|
||||
|
||||
loadData()
|
||||
initHotkey()
|
||||
watchParamButton()
|
||||
} catch (error) {
|
||||
console.error(error, error.stack)
|
||||
alert(error)
|
||||
}
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user