Skip to content

Commit 23804d8

Browse files
committed
resetting memory credentials after disconnect
1 parent db1def4 commit 23804d8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/shared/modules/connections/connectionsDuck.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export function getConnectionData(
193193
return { ...data, username: memoryUsername, password: memoryPassword }
194194
}
195195

196-
return data
196+
return { ...data, username: data.username ? data.username : memoryUsername }
197197
}
198198

199199
const removeConnectionHelper = (
@@ -652,9 +652,10 @@ export const disconnectEpic = (action$: any, store: any) => {
652652
.merge(action$.ofType(USER_CLEAR))
653653
.do(() => bolt.closeConnection())
654654
.do(() => store.dispatch(resetUseDb()))
655-
.do((action: any) =>
655+
.do((action: any) => {
656+
memoryPassword = ''
656657
store.dispatch(updateConnection({ id: action.id, password: '' }))
657-
)
658+
})
658659
.map(() => setActiveConnection(null))
659660
}
660661
export const silentDisconnectEpic = (action$: any, store: any) => {

0 commit comments

Comments
 (0)