Display a warning when source is empty instead of throwing an error
This commit is contained in:
parent
f69231fe81
commit
02851bb21f
4
Video.js
4
Video.js
@ -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):/));
|
||||
|
Loading…
Reference in New Issue
Block a user