From 0018380759cde64076a1a87753a7c7c801c5c1a4 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Fri, 23 Oct 2015 11:23:20 +0330 Subject: [PATCH] fix(selection): clear selection after changing directory --- build/main.js | 4 ++++ src/js/reducers/active-file.js | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/build/main.js b/build/main.js index a525cce..d17f176 100644 --- a/build/main.js +++ b/build/main.js @@ -32012,6 +32012,10 @@ exports['default'] = function (state, action) { return action.file; } + if (action.type === _actionsTypes.CHANGE_DIRECTORY) { + return null; + } + return state; }; diff --git a/src/js/reducers/active-file.js b/src/js/reducers/active-file.js index 0c7fc89..f79e2fe 100644 --- a/src/js/reducers/active-file.js +++ b/src/js/reducers/active-file.js @@ -1,9 +1,13 @@ -import { ACTIVE_FILE } from 'actions/types'; +import { ACTIVE_FILE, CHANGE_DIRECTORY } from 'actions/types'; export default function(state = null, action) { if (action.type === ACTIVE_FILE) { return action.file; } + if (action.type === CHANGE_DIRECTORY) { + return null; + } + return state; }