Skip to content

Commit

Permalink
Fix missing reference (tabId) in windowsSetCwd()
Browse files Browse the repository at this point in the history
The body of windowsSetCwd has been copied from index.js. However the signature has changed, and tabId is no longer passed as an argument. Since the caller already sets curTabId as action.uid, I propose a fix to replace missing tabId with action.uid, although it also makes sense to remove the `tabId === curTabId` condition altogether, because now it will always be true.
  • Loading branch information
asyncore committed Apr 25, 2018
1 parent c594f2a commit 9926b0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setCwd.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const windowsSetCwd = ({ dispatch, action, tab, curTabId }) => {
const newCwd = directoryRegex.exec(action.data);
if (newCwd) {
const cwd = newCwd[0];
if (tab.cwd !== cwd && tabId === curTabId) {
if (tab.cwd !== cwd && action.uid === curTabId) {
dispatch({
type: 'SESSION_SET_CWD',
cwd,
Expand Down

0 comments on commit 9926b0a

Please sign in to comment.