Fixed a bug: Don't remove "landing" twice.
This commit is contained in:
11
ui/app.js
11
ui/app.js
@@ -57,8 +57,6 @@ const mainTemplate = `
|
|||||||
<loading v-else :error="loadErr"></loading>
|
<loading v-else :error="loadErr"></loading>
|
||||||
`.trim();
|
`.trim();
|
||||||
|
|
||||||
let clientInitialized = false;
|
|
||||||
|
|
||||||
function startApp(rootEl) {
|
function startApp(rootEl) {
|
||||||
let uiControlColor = new ControlColor();
|
let uiControlColor = new ControlColor();
|
||||||
|
|
||||||
@@ -279,15 +277,12 @@ function startApp(rootEl) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initializeClient() {
|
function initializeClient() {
|
||||||
if (clientInitialized) {
|
let landingRoot = document.getElementById("landing");
|
||||||
|
|
||||||
|
if (!landingRoot) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
clientInitialized = true;
|
|
||||||
|
|
||||||
document.body.classList.remove("landing");
|
|
||||||
|
|
||||||
let landingRoot = document.getElementById("landing");
|
|
||||||
landingRoot.parentNode.removeChild(landingRoot);
|
landingRoot.parentNode.removeChild(landingRoot);
|
||||||
|
|
||||||
let normalRoot = document.createElement("div");
|
let normalRoot = document.createElement("div");
|
||||||
|
|||||||
Reference in New Issue
Block a user