Permalink
Browse files

Added fallback, if window doesn't exist

  • Loading branch information...
timsuchanek committed May 24, 2013
1 parent 96d797f commit 8c576eae30fd64043590968307c7d0fc738d3479
Showing with 5 additions and 1 deletion.
  1. +5 −1 test/modules/drift-move.js
@@ -78,7 +78,11 @@ function drift (options, window) {
console.log('finished');
options.finished(x, y);
}
- window.clearInterval(interval);
+ if (window) {
+ window.clearInterval(interval);
+ } else {
+ clearInterval(interval);
+ }
returnVal = true;
}
}, MOVE_INTERVAL);

0 comments on commit 8c576ea

Please sign in to comment.