Skip to content

Commit

Permalink
Added fallback, if window doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed May 24, 2013
1 parent 96d797f commit 8c576ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/modules/drift-move.js
Expand Up @@ -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);
Expand Down

0 comments on commit 8c576ea

Please sign in to comment.