mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-08-02 15:42:55 -05:00
Fix script errors and back navigation not closing the help dialog
This commit is contained in:
parent
b4691da306
commit
4910fa7a88
|
|
@ -541,6 +541,7 @@ function processUrl() {
|
|||
if (location.pathname.endsWith('/help') || location.hash == '#help')
|
||||
helpDialog.showModal();
|
||||
else {
|
||||
helpDialog.close();
|
||||
const m = /[/#](?:(game)|replay)\/([A-Za-z0-9+/=\-_]+)$/.exec(location.toString());
|
||||
if (m) {
|
||||
if (m[1])
|
||||
|
|
@ -650,10 +651,12 @@ Promise.all([ cardDatabase.loadAsync().then(initCardDatabase), stageDatabase.loa
|
|||
setLoadingMessage(null);
|
||||
if (initialiseCallback)
|
||||
initialiseCallback();
|
||||
}, () => {
|
||||
preGameLoadingSection.hidden = true;
|
||||
communicationError('Unable to load game data from the server.', false);
|
||||
});
|
||||
}, initError);
|
||||
|
||||
function initError() {
|
||||
preGameLoadingSection.hidden = true;
|
||||
communicationError('Unable to load game data from the server.', false);
|
||||
}
|
||||
|
||||
showPage('preGame');
|
||||
processUrl();
|
||||
window.addEventListener('load', processUrl);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user