Skip to content

Commit

Permalink
added check for window in Common.now
Browse files Browse the repository at this point in the history
  • Loading branch information
liabru committed Sep 14, 2019
1 parent f9ea799 commit 9ef9d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Common.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ module.exports = Common;
* @return {number} the current timestamp
*/
Common.now = function() {
if (window.performance) {
if (typeof window !== 'undefined' && window.performance) {
if (window.performance.now) {
return window.performance.now();
} else if (window.performance.webkitNow) {
Expand Down

0 comments on commit 9ef9d02

Please sign in to comment.