Skip to content

Commit

Permalink
Fix compatibility with svgr and images
Browse files Browse the repository at this point in the history
  • Loading branch information
msand committed Mar 17, 2019
1 parent ec9637b commit 3cff87f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elements/Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export default class SvgImage extends Shape {
height={height}
meetOrSlice={meetOrSliceTypes[modes[1]] || 0}
align={alignEnum[modes[0]] || 'xMidYMid'}
src={Image.resolveAssetSource(href)}
src={Image.resolveAssetSource(
typeof href === 'string' ? { uri: href } : href,
)}
/>
);
}
Expand Down

0 comments on commit 3cff87f

Please sign in to comment.