Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Commit

Permalink
drop un-used empty array ImportDeclaration>specifiers
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
  • Loading branch information
bzz committed Feb 27, 2019
1 parent c645227 commit 998ff2c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions driver/normalizer/normalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,10 @@ var Normalizers = []Mapping{
},
)),
MapSemantic("ImportDeclaration", uast.Import{}, MapObj(
Obj{
"source": Var("path"),
"specifiers": Arr(),
Fields{
{Name: "source", Op: Var("path")},
// empty un-used array
{Name: "specifiers", Drop: true, Op: Arr()},
},
Obj{
"Path": Var("path"),
Expand Down

0 comments on commit 998ff2c

Please sign in to comment.