1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-05 10:18:09 +09:00

Fix: ap/show does not return on error (#3704)

This commit is contained in:
MeiMei 2018-12-21 00:09:02 +09:00 committed by syuilo
parent c8607ff7b6
commit f7964da899

View File

@ -25,11 +25,10 @@ export const meta = {
},
};
export default define(meta, (ps) => new Promise(async (res, rej) => {
const object = await fetchAny(ps.uri);
if (object == null) return rej('object not found');
res(object);
export default define(meta, (ps) => new Promise((res, rej) => {
fetchAny(ps.uri)
.then(object => object != null ? res(object) : rej('object not found'))
.catch(e => rej(e));
}));
/***