Skip to content

Commit

Permalink
fix "TypeError: document.getElementById(...) is null" error in browse…
Browse files Browse the repository at this point in the history
…r console
  • Loading branch information
floriannari committed Dec 6, 2024
1 parent f4d971a commit c5e765b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/javascripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1126,15 +1126,16 @@ var app = new Vue({
infos: {},
},
created: async function () {
this.getMessages();
const messagesPromise = this.getMessages();
this.getMethods();
await this.getInfos();
this.getUser();

// wait for the #home button, then click on it
await messagesPromise;
await $('#home').promise();
await this.$nextTick();
document.getElementById("home").click();
document.getElementById("home")?.click();
},
updated: async function () {
await this.$nextTick();
Expand Down

0 comments on commit c5e765b

Please sign in to comment.