Fix src type=nil NSDictionary crash (#455)
- Use NSNull object in NSDictionary when type (or URI) missing from supplied src object. - In addition, defensively supply valid strings for URI and type from JS.
This commit is contained in:
committed by
Matt Apperson
parent
2b709a5d54
commit
201335f05c
4
Video.js
4
Video.js
@@ -153,7 +153,7 @@ export default class Video extends Component {
|
||||
const resizeMode = this.props.resizeMode;
|
||||
const source = resolveAssetSource(this.props.source) || {};
|
||||
|
||||
let uri = source.uri;
|
||||
let uri = source.uri || '';
|
||||
if (uri && uri.match(/^\//)) {
|
||||
uri = `file://${uri}`;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ export default class Video extends Component {
|
||||
uri,
|
||||
isNetwork,
|
||||
isAsset,
|
||||
type: source.type,
|
||||
type: source.type || '',
|
||||
mainVer: source.mainVer || 0,
|
||||
patchVer: source.patchVer || 0,
|
||||
},
|
||||
|
Reference in New Issue
Block a user