summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/PlacesUtils.jsm
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/places/PlacesUtils.jsm')
-rw-r--r--toolkit/components/places/PlacesUtils.jsm9
1 files changed, 6 insertions, 3 deletions
diff --git a/toolkit/components/places/PlacesUtils.jsm b/toolkit/components/places/PlacesUtils.jsm
index 323fa41a1..5f6e81f18 100644
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -1341,7 +1341,7 @@ this.PlacesUtils = {
* The container node to search through.
* @returns true if the node contains uri nodes, false otherwise.
*/
- hasChildURIs: function PU_hasChildURIs(aNode) {
+ hasChildURIs: function PU_hasChildURIs(aNode, aMultiple=false) {
if (!this.nodeIsContainer(aNode))
return false;
@@ -1357,11 +1357,14 @@ this.PlacesUtils = {
root.containerOpen = true;
}
+ let foundFirst = !aMultiple;
let found = false;
for (let i = 0; i < root.childCount && !found; i++) {
let child = root.getChild(i);
- if (this.nodeIsURI(child))
- found = true;
+ if (this.nodeIsURI(child)) {
+ found = foundFirst;
+ foundFirst = true;
+ }
}
if (!wasOpen) {