Fix access to undefined root property

The ::filterDefined transform unfortunately doesn't prevent an undefined
initial value when applied to behaviors.
Esse commit está contido em:
Nathan Sobo
2014-01-09 10:47:07 -07:00
commit 466868e639
+4 -3
Ver Arquivo
@@ -14,9 +14,10 @@ class PaneContainerModel extends Model
constructor: ->
super
@subscribe @$root.filterDefined(), (root) =>
root.parent = this
root.focusContext = @focusContext
@subscribe @$root, (root) =>
if root?
root.parent = this
root.focusContext = @focusContext
deserializeParams: (params) ->
params.root = atom.deserializers.deserialize(params.root)