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) { async function load(path) {
let response = await fetch((path || url()) + 'view'); let response = await fetch((path || url()) + 'view');
if (!response.ok) { let json;
if (response.status == 404) { if (response.ok) {
return null; json = await response.json();
} else { } else if (response.status != 404) {
throw new Error(response.status + ' ' + response.statusText); throw new Error(response.status + ' ' + response.statusText);
}
} }
let json = await response.json();
gFiles = {}; gFiles = {};
let isApp = false; let isApp = false;
let promises = []; let promises = [];