[FIX] fix a crash in sub kanban views
authorGéry Debongnie <ged@odoo.com>
Wed, 8 Oct 2014 13:35:31 +0000 (15:35 +0200)
committerGéry Debongnie <ged@odoo.com>
Tue, 21 Oct 2014 07:33:52 +0000 (09:33 +0200)
sub kanban views is sometimes initialized without a $buttons attribute in options.  In that case, it should just ignore it.

addons/web_kanban/static/src/js/kanban.js

index 0f9b215..62489a3 100644 (file)
@@ -43,7 +43,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
         this.currently_dragging = {};
         this.limit = options.limit || 40;
         this.add_group_mutex = new $.Mutex();
-        if (!this.options.$buttons.length) {
+        if (!this.options.$buttons || !this.options.$buttons.length) {
             this.options.$buttons = false;
         }
     },