From 2acde6a727f71a90554790112c761ddff6bbf06d Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 8 Jan 2014 11:20:15 -0700 Subject: [PATCH] Call `super` in constructor to assign PaneModel properties The theorist model superclass constructor will automatically assign all declared properties, or substitute the specified default value if no param key is present for that property. --- src/pane-model.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pane-model.coffee b/src/pane-model.coffee index 94cb78d82..c39174083 100644 --- a/src/pane-model.coffee +++ b/src/pane-model.coffee @@ -8,10 +8,11 @@ class PaneModel extends Model Serializable.includeInto(this) @properties + items: -> [] activeItem: null - constructor: ({@items, @activeItem}) -> - @items ?= [] + constructor: -> + super @activeItem ?= @items[0] serializeParams: ->