1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-08-25 23:03:07 +02:00

continue logic

This commit is contained in:
Kyle Spearrin 2018-11-30 09:49:08 -05:00
parent 2a960da31c
commit 5609fecbce

View File

@ -14,16 +14,17 @@ export class ServiceUtils {
const partName = parts[partIndex];
for (let i = 0; i < nodeTree.length; i++) {
if (nodeTree[i].node.name === parts[partIndex]) {
if (end && nodeTree[i].node.id !== obj.id) {
// Another node with the same name.
nodeTree.push(new TreeNode(obj, partName, parent));
return;
}
ServiceUtils.nestedTraverse(nodeTree[i].children, partIndex + 1, parts,
obj, nodeTree[i].node, delimiter);
if (nodeTree[i].node.name !== parts[partIndex]) {
continue;
}
if (end && nodeTree[i].node.id !== obj.id) {
// Another node with the same name.
nodeTree.push(new TreeNode(obj, partName, parent));
return;
}
ServiceUtils.nestedTraverse(nodeTree[i].children, partIndex + 1, parts,
obj, nodeTree[i].node, delimiter);
return;
}
if (nodeTree.filter((n) => n.node.name === partName).length === 0) {