mirror of
https://github.com/status-im/react-native-fast-image.git
synced 2025-02-24 12:18:12 +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 React, { Component } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import {
|
import {
|
||||||
|
Platform,
|
||||||
View,
|
View,
|
||||||
Image,
|
Image,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
@ -33,7 +34,7 @@ class FastImage extends Component {
|
|||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
// If there's no source or source uri just fallback to Image.
|
// 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 (
|
return (
|
||||||
<Image
|
<Image
|
||||||
ref={e => (this._root = e)}
|
ref={e => (this._root = e)}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user