mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-13 20:24:00 +02:00
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:
@@ -506,8 +506,9 @@ func (b *batcher) doBuild(ctx context.Context) (*Package, error) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
bt := scriptBatchTemplateContext{
|
bt := scriptBatchTemplateContext{
|
||||||
opts: vv,
|
opts: vv,
|
||||||
Import: impPath,
|
Import: impPath,
|
||||||
|
Instances: []scriptInstanceBatchTemplateContext{},
|
||||||
}
|
}
|
||||||
state.importResource.Set(bt.Import, vv.Compiled().Resource)
|
state.importResource.Set(bt.Import, vv.Compiled().Resource)
|
||||||
predicate := func(k instanceID) bool {
|
predicate := func(k instanceID) bool {
|
||||||
|
Reference in New Issue
Block a user