Fix an issue where pgAdmin4 unable to retrieve table node if the trigger is already disabled and the user clicks on Enable All. Fixes #4953.

This commit is contained in:
Khushboo Vashi
2019-12-02 15:26:36 +05:30
committed by Akshay Joshi
parent d95e8db4ee
commit ae2aadeede
3 changed files with 4 additions and 2 deletions
@@ -211,7 +211,7 @@ _.extend(pgBrowser.browserTreeState, {
node = data && pgBrowser.Nodes[data._type],
treeHierarchy = node && node.getTreeNodeHierarchy(item);
if (!pgBrowser.tree.hasParent(item) || !(self.parent in treeHierarchy))
if (treeHierarchy === null || !pgBrowser.tree.hasParent(item) || !(self.parent in treeHierarchy))
return;
let topParent = treeHierarchy && treeHierarchy[self.parent]['_id'],
@@ -269,7 +269,7 @@ _.extend(pgBrowser.browserTreeState, {
treeHierarchy = node && node.getTreeNodeHierarchy(item);
if (!pgBrowser.tree.hasParent(item) || !(self.parent in treeHierarchy))
if (treeHierarchy === null || !pgBrowser.tree.hasParent(item) || !(self.parent in treeHierarchy))
return;
// If the server node is open then only we should populate the tree