Skip to content

Commit 2d82778

Browse files
committed
[change] Image code comments
1 parent 80ee858 commit 2d82778

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,12 @@ const ImageWithHeaders: ImageComponent = React.forwardRef((props, ref) => {
402402

403403
const propsToPass = {
404404
...props,
405-
// Omit load start because we already triggered it here
405+
// Omit `onLoadStart` because we trigger it in the current scope
406406
onLoadStart: undefined,
407-
source: { ...nextSource, uri: blobUri }
407+
// Until the current component resolves the request (using headers)
408+
// we skip forwarding the source so the base component doesn't attempt
409+
// to load the original source
410+
source: blobUri ? { ...nextSource, uri: blobUri } : undefined
408411
};
409412

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

0 commit comments

Comments
 (0)