From adf63e5fa081b0eede53cde3467e7d0b334f85f2 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 12 Oct 2018 16:59:36 +0100 Subject: [PATCH] Make seek() throw an exception when using NaN value --- Video.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Video.js b/Video.js index 4529dd44..b191dae1 100644 --- a/Video.js +++ b/Video.js @@ -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: {