mirror of
https://github.com/status-im/react-native-fast-image.git
synced 2025-02-23 19:58:15 +00:00
Merge pull request #169 from tianling536/master
fixed cannot display local image on android
This commit is contained in:
commit
3bcb02219c
3
index.js
3
index.js
@ -1,6 +1,7 @@
|
||||
import React, { Component } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import {
|
||||
Platform,
|
||||
View,
|
||||
Image,
|
||||
NativeModules,
|
||||
@ -33,7 +34,7 @@ class FastImage extends Component {
|
||||
} = this.props
|
||||
|
||||
// If there's no source or source uri just fallback to Image.
|
||||
if (!source || !source.uri) {
|
||||
if (!source || !source.uri || (Platform.OS === 'android' && source.uri.startsWith('file://'))) {
|
||||
return (
|
||||
<Image
|
||||
ref={e => (this._root = e)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user