Fix editing missing apps.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3850 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2022-02-27 02:35:51 +00:00
parent c138582638
commit 07a87ff9de

View File

@ -204,7 +204,11 @@ function loadFile(name, id) {
function load(path) {
return fetch((path || url()) + 'view').then(function(response) {
if (!response.ok) {
throw new Error(response.status + ' ' + response.statusText);
if (response.status == 404) {
return null;
} else {
throw new Error(response.status + ' ' + response.statusText);
}
}
return response.json();
}).then(function(json) {