From 2a707863d218d12218810225b1e09691b7977acf Mon Sep 17 00:00:00 2001 From: Taka Date: Fri, 22 Jul 2022 10:53:14 +1000 Subject: [PATCH] Fixed a timing error during startup. --- vasl_templates/webapp/static/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vasl_templates/webapp/static/main.js b/vasl_templates/webapp/static/main.js index 35e11d9..1c05f9f 100644 --- a/vasl_templates/webapp/static/main.js +++ b/vasl_templates/webapp/static/main.js @@ -746,7 +746,10 @@ function update_page_load_status( id ) // NOTE: If the default scenario contains any vehicles or ordnance, it will look up the V/O listings, // so we need to wait until those have arrived. Note that while the default scenario will normally // be empty, having stuff in it is very useful during development. - if ( gPageLoadStatus.indexOf( "vehicle-listings" ) === -1 && gPageLoadStatus.indexOf( "ordnance-listings" ) === -1 ) { + // NOTE: We also have to wait for the vehicle/ordnance notes to arrive, so that we can show/hide + // the UI controls in the OB tabs. + if ( gPageLoadStatus.indexOf( "vehicle-listings" ) === -1 && gPageLoadStatus.indexOf( "ordnance-listings" ) === -1 && + gPageLoadStatus.indexOf( "vehicle-notes" ) === -1 && gPageLoadStatus.indexOf( "ordnance-notes" ) === -1 ) { // NOTE: We also need to wait for the app config to arrive (for the scenario theaters). if ( gPageLoadStatus.indexOf( "app-config" ) === -1 ) { do_on_new_scenario( false ) ;