Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Sep 27, 2023
1 parent 760d21f commit e6b5043
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1030,13 +1030,14 @@ func (task *BuildTask) resolveExternal(specifier string, kind api.ResolveKind) s
}

if kind == api.ResolveJSRequireCall {
has := false
var found bool
for _, v := range task.requires {
if has = v[0] == specifier; has {
if v[0] == specifier {
found = true
break
}
}
if !has {
if !found {
task.requires = append([][2]string{{specifier, resolvedPath}}, task.requires...)
}
return specifier
Expand Down

0 comments on commit e6b5043

Please sign in to comment.