Fix seeding files for a new app.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4808 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2024-01-28 13:09:31 +00:00
parent 2c79e03094
commit 49c831cb62

View File

@ -473,14 +473,12 @@ function loadFile(name, id) {
async function load(path) {
let response = await fetch((path || url()) + 'view');
if (!response.ok) {
if (response.status == 404) {
return null;
} else {
throw new Error(response.status + ' ' + response.statusText);
}
let json;
if (response.ok) {
json = await response.json();
} else if (response.status != 404) {
throw new Error(response.status + ' ' + response.statusText);
}
let json = await response.json();
gFiles = {};
let isApp = false;
let promises = [];