Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7dd666c

Browse files
committedFeb 27, 2019
drop un-used empty array ImportDeclaration>specifiers
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent 4339383 commit 7dd666c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎driver/normalizer/normalizer.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,10 @@ var Normalizers = []Mapping{
144144
},
145145
)),
146146
MapSemantic("ImportDeclaration", uast.Import{}, MapObj(
147-
Obj{
148-
"source": Var("path"),
149-
"specifiers": Arr(),
147+
Fields{
148+
{Name: "source", Op: Var("path")},
149+
// empty un-used array
150+
{Name: "specifiers", Drop: true, Op: Any()},
150151
},
151152
Obj{
152153
"Path": Var("path"),

0 commit comments

Comments
 (0)
This repository has been archived.