Fix several file processings (#2968)
* Ignore image error in person * Fix hang while processing empty file
This commit is contained in:
parent
b8ed8336e0
commit
72754ede4e
2 changed files with 6 additions and 2 deletions
|
|
@ -190,7 +190,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<IU
|
|||
].map(img =>
|
||||
img == null
|
||||
? Promise.resolve(null)
|
||||
: resolveImage(user, img)
|
||||
: resolveImage(user, img).catch(() => null)
|
||||
)));
|
||||
|
||||
const avatarId = avatar ? avatar._id : null;
|
||||
|
|
@ -276,7 +276,7 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje
|
|||
].map(img =>
|
||||
img == null
|
||||
? Promise.resolve(null)
|
||||
: resolveImage(exist, img)
|
||||
: resolveImage(exist, img).catch(() => null)
|
||||
)));
|
||||
|
||||
// Update user
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue