lib/model: Fixed adding empty items to device list (fixes #8646) (#8647)

This commit is contained in:
Aleksey Vasenev 2022-12-07 04:22:35 +08:00 committed by GitHub
parent d40d9d5698
commit 05738001ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1278,7 +1278,7 @@ func (m *model) ClusterConfig(deviceID protocol.DeviceID, cm protocol.ClusterCon
for _, fcfg := range folders {
cfg.Folders = append(cfg.Folders, fcfg)
}
cfg.Devices = make([]config.DeviceConfiguration, len(devices))
cfg.Devices = make([]config.DeviceConfiguration, 0, len(devices))
for _, dcfg := range devices {
cfg.Devices = append(cfg.Devices, dcfg)
}