Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
74c31b4b
Commit
74c31b4b
authored
Oct 02, 2020
by
aniket-engg
Committed by
Aniket
Oct 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linting fix
parent
80ac4d0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
astWalker.ts
libs/remix-astwalker/src/astWalker.ts
+3
-3
No files found.
libs/remix-astwalker/src/astWalker.ts
View file @
74c31b4b
...
...
@@ -64,15 +64,15 @@ export class AstWalker extends EventEmitter {
nodes
=
nodes
.
filter
(
e
=>
e
)
// If any element in nodes is array, extract its members
le
t
objNodes
=
[]
cons
t
objNodes
=
[]
nodes
.
forEach
(
x
=>
{
if
(
Array
.
isArray
(
x
))
objNodes
.
push
(...
x
)
else
objNodes
.
push
(
x
)
});
// Filter duplicate nodes using id field
le
t
normalizedNodes
=
[]
objNodes
.
forEach
((
element
,
index
)
=>
{
cons
t
normalizedNodes
=
[]
objNodes
.
forEach
((
element
)
=>
{
const
firstIndex
=
normalizedNodes
.
findIndex
(
e
=>
e
.
id
===
element
.
id
)
if
(
firstIndex
==
-
1
)
normalizedNodes
.
push
(
element
)
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment