Permalink
Browse files

Add check a undefined

  • Loading branch information...
1 parent b4e2b84 commit 2da4699a21d84b3253b506fd0b47aaee835d1660 @rewish committed Apr 26, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 js/IconGen.js
View
@@ -181,7 +181,8 @@
IconGen.prototype.getFileURL = function() {
var dataURL = this.canvas.toDataURL('image/png');
- if (URL && dataURLtoBlob) {
+ if (typeof URL !== 'undefined'
+ && typeof dataURLtoBlob !== 'undefined') {
return URL.createObjectURL(dataURLtoBlob(dataURL));
}
return dataURL;

0 comments on commit 2da4699

Please sign in to comment.