Skip to content

Commit

Permalink
Fix expanding 2 nodes at once (#1568)
Browse files Browse the repository at this point in the history
* fix race condition when expanding 2 nodes at once

* dont update current node but just the children

* fix bug
  • Loading branch information
Aditya Bist committed Jan 17, 2020
1 parent 8667d80 commit 43b4e5c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/objectExplorer/objectExplorerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@ export class ObjectExplorerService {
const handler = (result: ExpandResponse) => {
if (result && result.nodes) {
const credentials = self._sessionIdToConnectionCredentialsMap.get(result.sessionId);
let parentNode = self._rootTreeNodeArray.find(n => n.nodePath === result.nodePath);
const children = result.nodes.map(node => TreeNodeInfo.fromNodeInfo(node, result.sessionId,
self._currentNode, credentials));
self._treeNodeToChildrenMap.set(self._currentNode, children);
parentNode, credentials));
self._treeNodeToChildrenMap.set(parentNode, children);
const expandParams: ExpandParams = {
sessionId: result.sessionId,
nodePath: result.nodePath
Expand Down

0 comments on commit 43b4e5c

Please sign in to comment.