fix broken admin site when no archives are present
This commit is contained in:
parent
2f7a031eca
commit
095f67973b
@ -178,7 +178,12 @@ $config_data = json_decode($raw_json_config, false);
|
||||
}
|
||||
|
||||
function defaultNewArchive() {
|
||||
lastlink = document.getElementById("archive_links").lastElementChild.getAttribute("href");
|
||||
try {
|
||||
lastlink = document.getElementById("archive_links").lastElementChild.getAttribute("href");
|
||||
} catch(err) {
|
||||
// last link not found, perhaps there is no archive yet
|
||||
lastlink = "sentences-archive-8-aug-00.txt";
|
||||
}
|
||||
var re = /(\d+)-(\w\w\w)-(\d+)\.txt/;
|
||||
res = re.exec(lastlink);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user