mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
Fix: ap/show does not return on error (#3704)
This commit is contained in:
parent
465650d723
commit
818cdcfb69
@ -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));
|
||||
}));
|
||||
|
||||
/***
|
||||
|
Loading…
Reference in New Issue
Block a user