Display a warning when source is empty instead of throwing an error

This commit is contained in:
Hampton Maxwell 2019-02-18 21:36:17 -08:00
parent f69231fe81
commit 02851bb21f

View File

@ -227,7 +227,9 @@ export default class Video extends Component {
uri = `file://${uri}`;
}
if (!uri) throw new Error('Trying to load empty source.');
if (!uri) {
console.warn('Trying to load empty source.');
}
const isNetwork = !!(uri && uri.match(/^https?:/));
const isAsset = !!(uri && uri.match(/^(assets-library|ipod-library|file|content|ms-appx|ms-appdata):/));