react-native-image-progress
Advanced tools
Comparing version 1.0.0 to 1.0.1
11
index.js
@@ -154,2 +154,11 @@ import React, { Component } from 'react'; | ||
} = this.props; | ||
if (!source || !source.uri) { | ||
// This is not a networked asset so fallback to regular image | ||
return ( | ||
<ImageComponent source={source} style={style} {...props}> | ||
{children} | ||
</ImageComponent> | ||
); | ||
} | ||
const { progress, thresholdReached, loading, error } = this.state; | ||
@@ -189,3 +198,3 @@ | ||
{...props} | ||
key={source ? source.uri || source : undefined} | ||
key={source && source.uri} | ||
onLoadStart={this.handleLoadStart} | ||
@@ -192,0 +201,0 @@ onProgress={this.handleProgress} |
{ | ||
"name": "react-native-image-progress", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Progress indicator for networked images, supports progress bar and spinner", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
11167
189