mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Fix issues splitting panes with DOM events
* ::copyActiveItem guards against not having an active item * The Pane constructor removes undefined items from params.items
This commit is contained in:
@@ -23,6 +23,11 @@ describe "Pane", ->
|
||||
pane = new Pane(items: [new Item("A"), new Item("B")])
|
||||
expect(pane.activeItem).toBe pane.items[0]
|
||||
|
||||
it "compacts the items array", ->
|
||||
pane = new Pane(items: [undefined, new Item("A"), null, new Item("B")])
|
||||
expect(pane.items.length).toBe 2
|
||||
expect(pane.activeItem).toBe pane.items[0]
|
||||
|
||||
describe "::activateItem(item)", ->
|
||||
pane = null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user