diff options
| author | Ben Beltran <ben@freshout.us> | 2013-05-13 11:00:16 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@freshout.us> | 2013-05-13 11:00:16 -0500 |
| commit | e9b602cf60562b6baff5a0ddfddc434818b93e65 (patch) | |
| tree | 338cd1bce20f6b8732a2a81b481919622701d050 /lib | |
| parent | 752c9894f974aa28dffe81e0c3e4c0fadec32147 (diff) | |
Checks for timing in performance before using it.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/cobalt.js | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } |