Skip to content

Commit

Permalink
skip empty imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Martinez committed Oct 10, 2019
1 parent dde2b64 commit 8570975
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ func importDependencies(project common.AppProject) error {

imports := ai.GetAllImports()

if len(imports) == 0 {
return nil
}

err = project.AddImports(true, imports...)
if err != nil {
return err
Expand Down

0 comments on commit 8570975

Please sign in to comment.