Index: chrome/browser/resources/bookmark_manager/js/main.js |
diff --git a/chrome/browser/resources/bookmark_manager/js/main.js b/chrome/browser/resources/bookmark_manager/js/main.js |
index dea7bfb756b36c3eb7a04defe9005caaf307d9b3..82901b1e33bf77c8e29ba4a4efaabd69b3e685e7 100644 |
--- a/chrome/browser/resources/bookmark_manager/js/main.js |
+++ b/chrome/browser/resources/bookmark_manager/js/main.js |
@@ -317,8 +317,12 @@ function getAllUrls(nodes) { |
var urls = []; |
// Adds the node and all its direct children. |
+ // TODO(deepak.m1): Here node should exist. When we delete the nodes then |
+ // datamodel gets updated but still it shows deleted items as selected items |
+ // and accessing those nodes throws chrome.runtime.lastError. This cause |
+ // undefined value for node. Please refer https://crbug.com/480935. |
function addNodes(node) { |
- if (node.id == 'new') |
+ if (!node || node.id == 'new') |
return; |
if (node.children) { |