优化
This commit is contained in:
@@ -25,7 +25,9 @@ export function normalizeReceivingCandidate(value = {}) {
|
||||
|
||||
export function normalizeReceivingSession(value) {
|
||||
if (!value) return null
|
||||
const photos = Array.isArray(value.photos) ? value.photos : []
|
||||
const photos = Array.isArray(value.photos)
|
||||
? value.photos.map((photo) => ({ ...photo, fileId: String(photo.fileId) }))
|
||||
: []
|
||||
return {
|
||||
...value,
|
||||
photos: RECEIVING_PHOTO_ROLES.map((role) => photos.find((photo) => photo?.role === role)).filter(Boolean),
|
||||
|
||||
Reference in New Issue
Block a user