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 4e0ad31 commit 75441bdCopy full SHA for 75441bd
src/components/image/__tests__/index.spec.js
@@ -59,5 +59,10 @@ describe('Image', () => {
59
const uut = new Image({source: {uri: null}});
60
expect(uut.getImageSource()).toEqual({uri: undefined});
61
});
62
+
63
+ it('should handle when source sent with uri is empty string', () => {
64
+ const uut = new Image({source: {uri: ''}});
65
+ expect(uut.getImageSource()).toEqual({uri: undefined});
66
+ });
67
68
src/components/image/index.js
@@ -51,7 +51,7 @@ class Image extends BaseComponent {
51
}
52
53
const {source} = this.props;
54
- if (_.get(source, 'uri') === null) {
+ if (_.get(source, 'uri') === null || _.get(source, 'uri') === '') {
55
return {...source, uri: undefined};
56
57
0 commit comments