Permalink
Browse files

Avoid error message in tests

  • Loading branch information...
1 parent 8116439 commit 6bba11bedc626cc2a972f8dcf56eb75bbba5679c @fhd committed Apr 17, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 public/js/utils.js
View
@@ -1,6 +1,8 @@
var utils = {
createDrawFunction: function(canvas, drawFunction) {
return function() {
+ if (!canvas)
+ return;
drawFunction(canvas.getContext("2d"), canvas.width, canvas.height);
};
}

0 comments on commit 6bba11b

Please sign in to comment.