Fix crash when deserializing a pane without a wrapped view

This commit is contained in:
Brian Lopez & Nathan Sobo
2013-01-17 16:30:09 -08:00
parent a8a46470de
commit b82e9df5f5
2 changed files with 104 additions and 92 deletions

View File

@@ -6,14 +6,14 @@ module.exports =
class Pane extends View
@content: (wrappedView) ->
@div class: 'pane', =>
@subview 'wrappedView', wrappedView
@subview 'wrappedView', wrappedView if wrappedView
@deserialize: ({wrappedView}, rootView) ->
new Pane(rootView.deserializeView(wrappedView))
serialize: ->
viewClass: "Pane"
wrappedView: @wrappedView.serialize()
wrappedView: @wrappedView?.serialize()
adjustDimensions: -> # do nothing