From: Ben Beltran Date: Mon, 13 May 2013 16:00:16 +0000 (-0500) Subject: Checks for timing in performance before using it. X-Git-Tag: v1.1.0~32 X-Git-Url: https://git.r.bdr.sh/rbdr/cologne/commitdiff_plain/335637478e6ee83862de720a2d85437a8b0bdf01?ds=inline;hp=-c Checks for timing in performance before using it. --- 335637478e6ee83862de720a2d85437a8b0bdf01 diff --git a/lib/cobalt.js b/lib/cobalt.js index 9554a04..981aab2 100644 --- a/lib/cobalt.js +++ b/lib/cobalt.js @@ -27,7 +27,7 @@ } Cobalt.now = function () { - if (typeof performance !== 'undefined') { + if (typeof performance !== 'undefined' && performance.timing) { return performance.timing.navigationStart + performance.now(); }