From ccd86d91de17f35b5a7394a5db93848affa458c6 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 15 Jan 2014 15:49:44 -0700 Subject: [PATCH] Make PaneContainer::activePaneItem behavior distinct until changed If we switch from one empty active pane to another empty active pane, there's no reason to emit a value from the activePaneItem behavior. --- src/pane-container.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pane-container.coffee b/src/pane-container.coffee index d45f6dcb3..de339c8a9 100644 --- a/src/pane-container.coffee +++ b/src/pane-container.coffee @@ -15,7 +15,9 @@ class PaneContainer extends Model previousRoot: null @behavior 'activePaneItem', -> - @$activePane.switch (activePane) -> activePane?.$activeItem + @$activePane + .switch((activePane) -> activePane?.$activeItem) + .distinctUntilChanged() constructor: (params) -> super