Skip to content

Commit

Permalink
Merge pull request TheWidlarzGroup#1283 from laurent22/patch-1
Browse files Browse the repository at this point in the history
Make seek() throw an exception when using NaN value
  • Loading branch information
cobarx authored Nov 14, 2018
2 parents dece8a2 + adf63e5 commit cbf96c2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export default class Video extends Component {
}

seek = (time, tolerance = 100) => {
if (isNaN(time)) throw new Error('Specified time is not a number');

if (Platform.OS === 'ios') {
this.setNativeProps({
seek: {
Expand Down

0 comments on commit cbf96c2

Please sign in to comment.