From d667ee6e8946a317746dbe3f83d9bae699bfc14f Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Sun, 20 Aug 2017 12:14:38 -0400 Subject: [PATCH] Clear history immediately when switching sources --- modules/ui/source_switch.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/ui/source_switch.js b/modules/ui/source_switch.js index 3a534bec0..5b6af31c9 100644 --- a/modules/ui/source_switch.js +++ b/modules/ui/source_switch.js @@ -16,9 +16,8 @@ export function uiSourceSwitch(context) { var live = d3.select(this) .classed('live'); - context.connection() - .switch(live ? keys[1] : keys[0]); - + context.history().clearSaved(); + context.connection().switch(live ? keys[1] : keys[0]); context.enter(modeBrowse(context)); context.flush();