mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Return empty array from getPanes when PaneContainer is destroyed
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
This commit is contained in:
committed by
Max Brunsfeld
parent
283a573ce5
commit
8a12be9a8d
@@ -102,7 +102,10 @@ class PaneContainer extends Model
|
||||
@setRoot(newChild)
|
||||
|
||||
getPanes: ->
|
||||
@getRoot().getPanes()
|
||||
if @alive
|
||||
@getRoot().getPanes()
|
||||
else
|
||||
[]
|
||||
|
||||
getPaneItems: ->
|
||||
@getRoot().getItems()
|
||||
@@ -195,7 +198,7 @@ class PaneContainer extends Model
|
||||
# Called by Model superclass when destroyed
|
||||
destroyed: ->
|
||||
@cancelStoppedChangingActivePaneItemTimeout()
|
||||
pane.destroy() for pane in @getPanes()
|
||||
pane.destroy() for pane in @getRoot().getPanes()
|
||||
@subscriptions.dispose()
|
||||
@emitter.dispose()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user