From c3179e910853541f11e5c355cbd40430dea58083 Mon Sep 17 00:00:00 2001 From: thomasrosen Date: Tue, 22 Nov 2022 01:33:10 +0100 Subject: [PATCH] run functions after load finished --- frontend/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/index.js b/frontend/index.js index 94da22f..0810630 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -141,7 +141,6 @@ function initTeams() { renderTeamSelected() renderTeamSelectedAutomatically() } -initTeams() const CloudFunctionsPrefix = 'https://us-central1-volt-4eca0.cloudfunctions.net/save_formdata' @@ -774,4 +773,8 @@ function _DATA_GOT_LOADED() { generateForm(_DATA_) } } -_DATA_GOT_LOADED() + +window.addEventListener('load', () => { + _DATA_GOT_LOADED() + initTeams() +}