Commit 74c31b4b authored by aniket-engg's avatar aniket-engg Committed by Aniket

linting fix

parent 80ac4d0b
......@@ -64,15 +64,15 @@ export class AstWalker extends EventEmitter {
nodes = nodes.filter(e => e)
// If any element in nodes is array, extract its members
let objNodes = []
const objNodes = []
nodes.forEach(x => {
if (Array.isArray(x)) objNodes.push(...x)
else objNodes.push(x)
});
// Filter duplicate nodes using id field
let normalizedNodes = []
objNodes.forEach((element, index) => {
const normalizedNodes = []
objNodes.forEach((element) => {
const firstIndex = normalizedNodes.findIndex(e => e.id === element.id)
if(firstIndex == -1) normalizedNodes.push(element)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment