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:
parent
c138582638
commit
07a87ff9de
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user