Skip to content

Commit 08dcf83

Browse files
fixed a bug of not resolving the Promise when detectSingleFace returns no result
1 parent 16b7dc6 commit 08dcf83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/globalApi/DetectFacesTasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class DetectSingleFaceTask extends DetectFacesTaskBase<FaceDetection | un
9090
private runAndExtendWithFaceDetection(): Promise<WithFaceDetection<{}>> {
9191
return new Promise<WithFaceDetection<{}>>(async res => {
9292
const detection = await this.run()
93-
return detection ? res(extendWithFaceDetection<{}>({}, detection)) : null
93+
return res(detection ? extendWithFaceDetection<{}>({}, detection) : undefined)
9494
})
9595
}
9696

0 commit comments

Comments
 (0)