Skip to content

Commit

Permalink
use for-loop instead of map/filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveneman committed Nov 10, 2024
1 parent 5ce9bc7 commit 3217be8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,9 @@ export function resolve_ast(ast) {

// @layer first, second;
if (node.block === null) {
layer_name
.split(',')
.map((name) => name.trim())
.forEach((name) => {
list.push([...resolve_parent_tree(ast, node), name])
})
for (let name of layer_name.split(',')) {
list.push([...resolve_parent_tree(ast, node), name.trim()])
}

return this.skip
}
Expand Down

0 comments on commit 3217be8

Please sign in to comment.