summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-07-19 12:42:00 +0100
committerErik Larkö <erik@mullvad.net>2017-07-20 09:46:36 +0200
commit2ea377f3bd30a1e8d1d6392fcd224e82ff418601 (patch)
treed64c0f23e9cb6cf30816b3e3c648168ec1715450 /app
parentfea816c3138b43c51d6ddcc7303704ca8e70bdfd (diff)
downloadmullvadvpn-2ea377f3bd30a1e8d1d6392fcd224e82ff418601.tar.xz
mullvadvpn-2ea377f3bd30a1e8d1d6392fcd224e82ff418601.zip
Mock "change" event
Diffstat (limited to 'app')
-rw-r--r--app/components/Switch.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/components/Switch.js b/app/components/Switch.js
index 59f997d879..c278cfbd2c 100644
--- a/app/components/Switch.js
+++ b/app/components/Switch.js
@@ -76,16 +76,12 @@ export default class Switch extends Component {
handleChange = (e: Event) => {
const startTime = this.state.startTime;
- const eventTarget = e.target;
+ const eventTarget: Object = e.target;
if(typeof(startTime) !== 'number') {
throw new Error('startTime must be a number.');
}
- if(!(eventTarget instanceof HTMLInputElement)) {
- throw new Error('e.target must be an instance of HTMLInputElement.');
- }
-
const dt = e.timeStamp - startTime;
if(this.state.ignoreChange) {