forked from cory/tildefriends
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,8 +204,12 @@ function loadFile(name, id) {
|
|||||||
function load(path) {
|
function load(path) {
|
||||||
return fetch((path || url()) + 'view').then(function(response) {
|
return fetch((path || url()) + 'view').then(function(response) {
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
if (response.status == 404) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
throw new Error(response.status + ' ' + response.statusText);
|
throw new Error(response.status + ' ' + response.statusText);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return response.json();
|
return response.json();
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
if (!gEditor) {
|
if (!gEditor) {
|
||||||
|
Loading…
Reference in New Issue
Block a user