Cache if regatta has results

This commit is contained in:
ostertun
2020-10-14 13:37:47 +02:00
parent 3b71f3d707
commit ce42f87227
4 changed files with 4 additions and 23 deletions

View File

@@ -61,8 +61,7 @@ async function onRegattaClicked(id) {
}
// Results
var results = await dbGetDataIndex('results', 'regatta', regatta['id']);
if (results.length > 0) {
if (regatta['results'] == '1') {
$('#menu-item-results').show();
$('#menu-item-results').attr('href', LINK_PRE + 'result?regatta=' + regatta['id']);
} else {