fix: do not resolve asset url for every object on web. (#2419)

# Summary

Do not resolve asset url for every object when href is undefined on
WebShape.
This commit is contained in:
Jakub Grzywacz
2024-08-21 11:12:35 +02:00
committed by GitHub
parent 4100c0897c
commit 49a99d83b7

View File

@@ -121,7 +121,7 @@ export const prepare = <T extends BaseProps>(
if (onPress !== null) {
clean.onClick = props.onPress;
}
if (props.href !== null) {
if (props.href !== null && props.href !== undefined) {
clean.href = resolveAssetUri(props.href)?.uri;
}
return clean;