fixed a cache issue
This commit is contained in:
@@ -375,14 +375,17 @@ function loadYear(year){
|
||||
document.getElementById('filterArea').innerHTML = '<option value="">All Areas</option>';
|
||||
document.getElementById('filterCuisine').innerHTML = '<option value="">All Cuisines</option>';
|
||||
resetFilters();
|
||||
fetch(year+'-restaurants.json')
|
||||
fetch(year+'-restaurants.json', {cache:'no-store'})
|
||||
.then(function(r){ return r.json(); })
|
||||
.then(function(data){
|
||||
RESTAURANTS = data.restaurants;
|
||||
document.getElementById('eventDates').textContent = data.eventDates;
|
||||
RESTAURANTS = Array.isArray(data) ? data : data.restaurants;
|
||||
if(data.eventDates) document.getElementById('eventDates').textContent = data.eventDates;
|
||||
initDropdowns();
|
||||
applyFilters();
|
||||
updateCounts();
|
||||
})
|
||||
.catch(function(err){
|
||||
document.getElementById('listPanel').innerHTML = '<div class="no-results">⚠️ Failed to load restaurant data.<br><small>'+err+'</small><br><small>Try serving this file from a local web server instead of opening it directly.</small></div>';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user