Fix notes.html: handle wrapped index.json format
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"lastUpdated": "2026-01-30T15:23:00Z",
|
||||
"lastUpdated": "2026-01-30T17:37:00.676Z",
|
||||
"programs": [
|
||||
"ROACONT",
|
||||
"ROAGEST",
|
||||
@@ -26,4 +26,4 @@
|
||||
"deadline": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -489,7 +489,8 @@
|
||||
async function loadNotesIndex() {
|
||||
try {
|
||||
const response = await fetch(indexPath + '?t=' + Date.now());
|
||||
notesIndex = await response.json();
|
||||
const data = await response.json();
|
||||
notesIndex = Array.isArray(data) ? data : (data.notes || []);
|
||||
console.log(`Loaded ${notesIndex.length} notes from index.json`);
|
||||
} catch (e) {
|
||||
console.error('Failed to load notes index:', e);
|
||||
|
||||
Reference in New Issue
Block a user