Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function explore_element(curNodeObject, elements, index) {
const element = elements[index];
assert(element instanceof translate_service.RelativePathElement);
const is_last = ( (index + 1) === elements.length);
const nodeIds = curNodeObject.browseNodeByTargetName(element,is_last);
const targets = nodeIds.map(function (nodeId) {
return {
targetId: nodeId,
remainingPathIndex: elements.length - index
};
});
if (!is_last) {
// explorer
for(let target of targets) {
const node = self.findNode(target.targetId);