Skip to content

Commit

Permalink
Check if window is undefined in system.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vince Allen committed Nov 25, 2014
1 parent 4f5b08e commit 3eed999
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion public/css/BitShadowMachine.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions public/index.html
Expand Up @@ -11,6 +11,7 @@ <h1>BitShadowMachine</h1>
<p><a href="Bit.Grid.html">Bit.Grid.html</a></p>
<p><a href="Bit.MultipleWorlds.html">Bit.MultipleWorlds.html</a></p>
<p><a href="Bit.Oscillator.html">Bit.Oscillator.html</a></p>
<p><a href="Bit.Reflection.html">Bit.Reflection.html</a></p>
<p><a href="Bit.SaveData.html">Bit.SaveData.html</a></p>
<p><a href="Bit.Simple.html">Bit.Simple.html</a></p>
<p><a href="Bit.Walker.html">Bit.Walker.html</a></p>
Expand Down
6 changes: 4 additions & 2 deletions public/scripts/bitshadowmachine.js
Expand Up @@ -2204,8 +2204,10 @@ var Utils = _dereq_('burner').Utils;
var Vector = _dereq_('burner').Vector;
var World = _dereq_('./world');

window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (typeof window !== 'undefined') {
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
}

/** @namespace */
var System = {
Expand Down
4 changes: 2 additions & 2 deletions public/scripts/bitshadowmachine.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/system.js
Expand Up @@ -7,8 +7,10 @@ var Utils = require('burner').Utils;
var Vector = require('burner').Vector;
var World = require('./world');

window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
if (typeof window !== 'undefined') {
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
}

/** @namespace */
var System = {
Expand Down

0 comments on commit 3eed999

Please sign in to comment.