Skip to content

Commit 8f4d952

Browse files
committed
[change] Image code comments
1 parent 4e6daca commit 8f4d952

File tree

1 file changed

+5
-2
lines changed
  • packages/react-native-web/src/exports/Image

1 file changed

+5
-2
lines changed

packages/react-native-web/src/exports/Image/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,12 @@ const ImageWithHeaders: ImageComponent = React.forwardRef((props, ref) => {
397397

398398
const propsToPass = {
399399
...props,
400-
// Omit load start because we already triggered it here
400+
// Omit `onLoadStart` because we trigger it in the current scope
401401
onLoadStart: undefined,
402-
source: { ...nextSource, uri: blobUri }
402+
// Until the current component resolves the request (using headers)
403+
// we skip forwarding the source so the base component doesn't attempt
404+
// to load the original source
405+
source: blobUri ? { ...nextSource, uri: blobUri } : undefined
403406
};
404407

405408
return <BaseImage ref={ref} {...propsToPass} />;

0 commit comments

Comments
 (0)