Browse Source

Checking for existence of `window` before using it

css_transitions
josdejong 10 years ago
parent
commit
660ab7e22d
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/graph/Graph.js

+ 4
- 3
src/graph/Graph.js View File

@ -1805,9 +1805,10 @@ Graph.prototype._animationStep = function() {
this.renderTime = Date.now() - renderTime;
};
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (typeof window !== 'undefined') {
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
}
/**
* Schedule a animation step with the refreshrate interval.

Loading…
Cancel
Save