mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-28 21:08:52 -07:00
[mastodon-client] Fix getNoteOr404
This commit is contained in:
parent
afd9e236a3
commit
153c08fae1
1 changed files with 2 additions and 3 deletions
|
@ -388,9 +388,8 @@ export class NoteHelpers {
|
|||
}
|
||||
|
||||
public static async getNoteOr404(id: string, user: ILocalUser | null): Promise<Note> {
|
||||
return getNote(id, user).then(p => {
|
||||
if (p === null) throw new MastoApiError(404);
|
||||
return p;
|
||||
return getNote(id, user).catch(_ => {
|
||||
throw new MastoApiError(404);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue