Skip to content

Commit

Permalink
fixing shipshapecode#217 - performance.now is null
Browse files Browse the repository at this point in the history
causing 

Uncaught TypeError: Object [object Performance] has no method 'now',

It has been fixed the same in other projects as well
  • Loading branch information
jony89 authored Aug 30, 2017
1 parent 3ea9008 commit 768c3b8
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 (typeof performance !== 'undefined' && typeof performance.now !== 'undefined') {
if (performance && performance.now) {
return performance.now();
}
return +new Date;
Expand Down

0 comments on commit 768c3b8

Please sign in to comment.