From a6ab661a9a4d383f0fbbc46404aeea5b63f163ad Mon Sep 17 00:00:00 2001 From: Guillaume Sabran Date: Thu, 19 May 2016 15:08:22 -0700 Subject: [PATCH] Fix issue when performance.now is not defined I've had a few error logs indicating that performance.now is not defined (`Uncaught TypeError: Object [object Performance] has no method 'now'`) It's somehow surprising since support looks good (https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) but... --- lib/client/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client/store.js b/lib/client/store.js index 68b4535..1ccdacd 100644 --- a/lib/client/store.js +++ b/lib/client/store.js @@ -51,7 +51,7 @@ Store.prototype.stop = function() { }; Store.prototype.now = function() { - if (isPerformanceExists) { + if (isPerformanceExists && performance.now) { return performance.now(); }