From 740c22238eb51b1c9a5140a8cb7084ad063e7f05 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 14 Jan 2016 16:15:07 +0000 Subject: [PATCH] Better date syntax --- src/UserActivity.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/UserActivity.js b/src/UserActivity.js index 5ed94a5f36..669b007934 100644 --- a/src/UserActivity.js +++ b/src/UserActivity.js @@ -56,7 +56,7 @@ class UserActivity { * (ie. within a few seconds) */ userCurrentlyActive() { - return this.lastActivityAtTs > (new Date).getTime() - CURRENTLY_ACTIVE_THRESHOLD_MS; + return this.lastActivityAtTs > new Date().getTime() - CURRENTLY_ACTIVE_THRESHOLD_MS; } _onUserActivity(event) { @@ -71,7 +71,7 @@ class UserActivity { this.lastScreenY = event.screenY; } - this.lastActivityAtTs = (new Date).getTime(); + this.lastActivityAtTs = new Date().getTime(); if (this.lastDispatchAtTs < this.lastActivityAtTs - MIN_DISPATCH_INTERVAL_MS) { this.lastDispatchAtTs = this.lastActivityAtTs; dis.dispatch({ @@ -86,7 +86,7 @@ class UserActivity { } _onActivityEndTimer() { - var now = (new Date).getTime(); + var now = new Date().getTime(); var targetTime = this.lastActivityAtTs + MIN_DISPATCH_INTERVAL_MS; if (now >= targetTime) { dis.dispatch({