Skip to content

Commit

Permalink
Image source without uri should return null.
Browse files Browse the repository at this point in the history
Summary: When image source doesn't have uri and is neither an array, it should return null.

Reviewed By: yungsters

Differential Revision: D8728688

fbshipit-source-id: 915c4f3f450907ee3435ac99b1fe9849738766da
  • Loading branch information
himabindugadupudi authored and facebook-github-bot committed Jul 3, 2018
1 parent bbc8bb1 commit 28c7ccf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Libraries/Image/Image.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ let Image = (
);
}

if (!source.uri && !Array.isArray(source)) {
return null;
}

let style;
let sources;
if (source?.uri != null) {
Expand Down

0 comments on commit 28c7ccf

Please sign in to comment.