Skip to content

Commit

Permalink
fixed find-tags-by-path to not accidentally skip ahead to nested tags…
Browse files Browse the repository at this point in the history
… with the same name
  • Loading branch information
DanielJDufour committed Jul 23, 2022
1 parent e7464b7 commit ed1566b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion find-tags-by-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const findTagsByName = require("./find-tags-by-name.js");
function findTagsByPath(xml, path, options) {
const debug = (options && options.debug) || false;
const returnOnFirst = (options && options.returnOnFirst) || false;
let tags = findTagsByName(xml, path.shift(), { debug });
let tags = findTagsByName(xml, path.shift(), { debug, nested: false });
if (debug) console.log("first tags are:", tags);
for (let pathIndex = 0; pathIndex < path.length; pathIndex++) {
const tagName = path[pathIndex];
Expand Down

0 comments on commit ed1566b

Please sign in to comment.