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 | 335637478e6ee83862de720a2d85437a8b0bdf01 (patch) | |
| tree | 8e033bec818d013b9fc1ec079457288cec987785 | |
| parent | 2b98d1717ffd38fd8768f4d84a02fd74e2a1d908 (diff) | |
Checks for timing in performance before using it.
| -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(); } |