Make loading single file work without scanning whole collection

This commit is contained in:
Mathias Biilmann Christensen
2016-10-27 14:23:36 +02:00
parent 2b99e2d176
commit bbce1c30de
7 changed files with 161 additions and 51 deletions

View File

@ -187,7 +187,10 @@ export function loadEntry(entry, collection, slug) {
} else {
getPromise = backend.lookupEntry(collection, slug);
}
return getPromise.then(loadedEntry => dispatch(entryLoaded(collection, loadedEntry)));
return getPromise
.then((loadedEntry) => {
return dispatch(entryLoaded(collection, loadedEntry));
});
};
}