Skip to content

Commit

Permalink
Guard against performance.now being unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
mogelbrod committed Nov 21, 2017
1 parent 7263bc0 commit 58c3c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/tether.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const position = () => {
};

function now() {
if (performance && performance.now) {
if (typeof performance === 'object' && typeof performance.now === 'function') {
return performance.now();
}
return +new Date;
Expand Down

0 comments on commit 58c3c0c

Please sign in to comment.