Skip to content

Commit 943af0a

Browse files
cobarxBeau Ner
authored andcommitted
Merge pull request TheWidlarzGroup#1478 from laurent22/master
Throw an error instead of crashing app when video source is empty (rebased from commit 98eb7a3)
1 parent 091b276 commit 943af0a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Video.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ export default class Video extends Component {
233233
if (uri && uri.match(/^\//)) {
234234
uri = `file://${uri}`;
235235
}
236+
237+
if (!uri) throw new Error('Trying to load empty source.');
236238

237239
const isNetwork = !!(uri && uri.match(/^https?:/));
238240
const isAsset = !!(uri && uri.match(/^(assets-library|ipod-library|file|content|ms-appx|ms-appdata):/));

0 commit comments

Comments
 (0)