Don't append(x,y) if x is not to be modified

... as append(x,y) would modify x.

refs #324
This commit is contained in:
Alexander A. Klimov 2021-07-29 13:44:18 +02:00
parent 261c5aab8d
commit f06bad5f23

View file

@ -211,7 +211,11 @@ func run() int {
// @TODO(el): The customvar runtime update sync may change because the customvar flat
// runtime update sync is not yet implemented.
return rt.Sync(synctx, append(v1.Factories, v1.NewCustomvar), runtimeUpdateStreams)
return rt.Sync(
synctx,
append([]contracts.EntityFactoryFunc{v1.NewCustomvar}, v1.Factories...),
runtimeUpdateStreams,
)
})
if err := g.Wait(); err != nil && !utils.IsContextCanceled(err) {