mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
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.
This commit is contained in:
@@ -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: ->
|
||||
|
||||
Reference in New Issue
Block a user