[#12783] fix index out of range when there are no filters

This commit is contained in:
Roman Volosovskyi 2022-02-02 14:58:55 +02:00
parent 4f4725a630
commit 62a0439234
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ func (m *Messenger) syncFilters(filters []*transport.Filter) (*MessengerResponse
prioritizedBatches := getPrioritizedBatches() prioritizedBatches := getPrioritizedBatches()
currentBatch := 0 currentBatch := 0
if filters[0].Priority == 0 { if len(filters) == 0 || filters[0].Priority == 0 {
currentBatch = len(prioritizedBatches) currentBatch = len(prioritizedBatches)
} }