Leo157 2024-06-05 22:15:00 +08:00 committed by GitHub
parent 126d9ef2e6
commit 3c4b497846
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,7 @@ import { getLogoUrlFromDomainName } from '~/utils';
import { isDefined } from '~/utils/isDefined'; import { isDefined } from '~/utils/isDefined';
import { getImageIdentifierFieldValue } from './getImageIdentifierFieldValue'; import { getImageIdentifierFieldValue } from './getImageIdentifierFieldValue';
import { getImageAbsoluteURIOrBase64 } from '~/utils/image/getImageAbsoluteURIOrBase64';
export const getAvatarUrl = ( export const getAvatarUrl = (
objectNameSingular: string, objectNameSingular: string,
@ -20,7 +21,7 @@ export const getAvatarUrl = (
} }
if (objectNameSingular === CoreObjectNameSingular.Person) { if (objectNameSingular === CoreObjectNameSingular.Person) {
return record.avatarUrl ?? ''; return getImageAbsoluteURIOrBase64(record.avatarUrl) ?? '';
} }
const imageIdentifierFieldValue = getImageIdentifierFieldValue( const imageIdentifierFieldValue = getImageIdentifierFieldValue(