]> git.r.bdr.sh - rbdr/cologne/commitdiff
Checks for timing in performance before using it.
authorBen Beltran <redacted>
Mon, 13 May 2013 16:00:16 +0000 (11:00 -0500)
committerBen Beltran <redacted>
Mon, 13 May 2013 16:00:16 +0000 (11:00 -0500)
lib/cobalt.js

index 9554a04ad248b7f3ef06412448e8aa387de350b1..981aab21b24c310d8f1cb161430233fefb5d7b51 100644 (file)
@@ -27,7 +27,7 @@
   }
 
   Cobalt.now = function () {
-    if (typeof performance !== 'undefined') {
+    if (typeof performance !== 'undefined' && performance.timing) {
       return performance.timing.navigationStart + performance.now();
     }