Chromium Code Reviews| Index: chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| diff --git a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| index 1effb8748b248cc31cc36c8c469089ea4a32133d..dfa4f65ab1809eaf227c9f96aba865e0bb0570eb 100644 |
| --- a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| +++ b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js |
| @@ -175,8 +175,12 @@ cr.define('settings', function() { |
| var dataType = ''; |
| if (descriptionNode.data_.type != undefined) |
| dataType = descriptionNode.data_.type; |
| - else |
| - dataType = descriptionNode.children_[0].data_.type; |
| + else { |
|
dschuyler
2016/09/29 19:40:27
If the |else| has braces {} the |if| should also
(
Finnur
2016/09/30 09:19:42
Ah, yes, I indeed.
|
| + // A description node can have no children when in the process of |
| + // being deleted. |
|
dschuyler
2016/09/29 19:40:27
optional:
// A description node might not have chi
Finnur
2016/09/30 09:19:42
Done.
|
| + if (descriptionNode.children_.length > 0) |
| + dataType = descriptionNode.children_[0].data_.type; |
|
Finnur
2016/09/29 15:54:01
This is not listed in the bug, but was discovered
dschuyler
2016/09/29 19:40:27
Thanks for the explanation!
|
| + } |
| var count = |
| (dataType == 'cookie') ? descriptionNode.children_.length : 0; |