diff --git a/docs/en_US/release_notes_4_16.rst b/docs/en_US/release_notes_4_16.rst index 20712c4ef..e77d9bacf 100644 --- a/docs/en_US/release_notes_4_16.rst +++ b/docs/en_US/release_notes_4_16.rst @@ -38,6 +38,7 @@ Bug fixes | `Issue #4934 `_ - Fix the help button link on the User Management dialog. | `Issue #4935 `_ - Fix accessibility issues. | `Issue #4952 `_ - Fix an issue of retrieving properties for Compound Triggers. It's a regression of #4006. +| `Issue #4953 `_ - Fix an issue where pgAdmin4 unable to retrieve table node if the trigger is already disabled and the user clicks on Enable All. | `Issue #4964 `_ - Fix an issue where length and precision are not removed from table/column dialog. | `Issue #4965 `_ - Fix an issue where the Interval data type is not displayed in the properties dialog of table/column. | `Issue #4978 `_ - Fix pgAdmin4 failed to start issue after upgrading to version 4.15. diff --git a/web/pgadmin/static/js/tree/pgadmin_tree_node.js b/web/pgadmin/static/js/tree/pgadmin_tree_node.js index 2a74fd115..f5a3e6e91 100644 --- a/web/pgadmin/static/js/tree/pgadmin_tree_node.js +++ b/web/pgadmin/static/js/tree/pgadmin_tree_node.js @@ -43,6 +43,7 @@ export function getTreeNodeHierarchyFromElement(pgBrowser, treeNode) { export function getTreeNodeHierarchyFromIdentifier(aciTreeNodeIdentifier) { let identifier = this.treeMenu.translateTreeNodeIdFromACITree(aciTreeNodeIdentifier); let currentNode = this.treeMenu.findNode(identifier); + if (currentNode === null) return null; return getTreeNodeHierarchy.call(this, currentNode); } diff --git a/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js b/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js index d4340833a..999027e9e 100644 --- a/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js +++ b/web/pgadmin/static/js/tree/pgadmin_tree_save_state.js @@ -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