We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93b1d04 commit 290cae2Copy full SHA for 290cae2
packages/react-native-web/src/exports/Image/index.js
@@ -113,6 +113,11 @@ function resolveAssetUri(source): ?string {
113
if (typeof source === 'number') {
114
// get the URI from the packager
115
const asset = getAssetByID(source);
116
+ if (asset == null) {
117
+ throw new Error(
118
+ `Image: asset with ID "${source}" could not be found. Please check the image source or packager.`
119
+ );
120
+ }
121
let scale = asset.scales[0];
122
if (asset.scales.length > 1) {
123
const preferredScale = PixelRatio.get();
0 commit comments