js/esbuild: Batch: Avoid nil Instances slice

Ranging over a nil slice in Go works great, but is a hassle onced passed to JS.
This commit is contained in:
Bjørn Erik Pedersen 2024-12-13 18:04:44 +01:00
parent a32c889a7b
commit 4cbd4ef991

View file

@ -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 {