Fix nil string parameter error

This commit is contained in:
chinloong 2017-07-11 16:18:26 +08:00
parent 7f2cd8751a
commit 11735bed88

View File

@ -162,6 +162,8 @@ export default class Video extends Component {
let uri = source.uri || ''; let uri = source.uri || '';
if (uri && uri.match(/^\//)) { if (uri && uri.match(/^\//)) {
uri = `file://${uri}`; uri = `file://${uri}`;
} else if (uri === '') {
return null;
} }
const isNetwork = !!(uri && uri.match(/^https?:/)); const isNetwork = !!(uri && uri.match(/^https?:/));