Add missing canvas support check on _resetHighlights
authorhappytodesign <mailbox@happytodesign.com>
Thu, 27 Jun 2013 19:04:28 +0000 (21:04 +0200)
committerhappytodesign <mailbox@happytodesign.com>
Thu, 27 Jun 2013 19:04:28 +0000 (21:04 +0200)
client/assets/src/views/favicon.js

index a74177148040c433028f0d55da8edc653ee16975..f4d5720c789181d616df1a04c655a24ec0fcbb07 100644 (file)
@@ -34,9 +34,11 @@ _kiwi.view.Favicon = Backbone.View.extend({
     _resetHighlights: function () {
         var that = this;
         this.highlight_count = 0;
-        this._drawFavicon(function(canvas) {
-            that._refreshFavicon(canvas.toDataURL());
-        });
+        if (this.has_canvas_support) {
+            this._drawFavicon(function(canvas) {
+                that._refreshFavicon(canvas.toDataURL());
+            });
+        }
     },
 
     _drawFavicon: function (callback) {
@@ -117,4 +119,4 @@ _kiwi.view.Favicon = Backbone.View.extend({
 
         return context;
     }
-});
\ No newline at end of file
+});