Skip to content

Commit

Permalink
js/esbuild: Batch: Avoid nil Instances slice
Browse files Browse the repository at this point in the history
Ranging over a nil slice in Go works great, but is a hassle onced passed to JS.
  • Loading branch information
bep committed Dec 16, 2024
1 parent a32c889 commit 4cbd4ef
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/js/esbuild/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,9 @@ func (b *batcher) doBuild(ctx context.Context) (*Package, error) {
})

bt := scriptBatchTemplateContext{
opts: vv,
Import: impPath,
opts: vv,
Import: impPath,
Instances: []scriptInstanceBatchTemplateContext{},
}
state.importResource.Set(bt.Import, vv.Compiled().Resource)
predicate := func(k instanceID) bool {
Expand Down

0 comments on commit 4cbd4ef

Please sign in to comment.