Skip to content

Commit 4cbd4ef

Browse files
committed
js/esbuild: Batch: Avoid nil Instances slice
Ranging over a nil slice in Go works great, but is a hassle onced passed to JS.
1 parent a32c889 commit 4cbd4ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/js/esbuild/batch.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,9 @@ func (b *batcher) doBuild(ctx context.Context) (*Package, error) {
506506
})
507507

508508
bt := scriptBatchTemplateContext{
509-
opts: vv,
510-
Import: impPath,
509+
opts: vv,
510+
Import: impPath,
511+
Instances: []scriptInstanceBatchTemplateContext{},
511512
}
512513
state.importResource.Set(bt.Import, vv.Compiled().Resource)
513514
predicate := func(k instanceID) bool {

0 commit comments

Comments
 (0)