Make seek() throw an exception when using NaN value
This commit is contained in:
parent
b9832c6e0b
commit
adf63e5fa0
2
Video.js
2
Video.js
@ -51,6 +51,8 @@ export default class Video extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
seek = (time, tolerance = 100) => {
|
seek = (time, tolerance = 100) => {
|
||||||
|
if (isNaN(time)) throw new Error('Specified time is not a number');
|
||||||
|
|
||||||
if (Platform.OS === 'ios') {
|
if (Platform.OS === 'ios') {
|
||||||
this.setNativeProps({
|
this.setNativeProps({
|
||||||
seek: {
|
seek: {
|
||||||
|
Loading…
Reference in New Issue
Block a user