Defensive / migration guard on uncategorised cookies

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-04 14:58:47 +04:00
parent f418780dd4
commit 4f1ecabcec

View File

@@ -1928,7 +1928,12 @@ func buildBannerConfig(
}
}
categories := snapshot.Categories
categories := make([]coredata.CookieBannerVersionSnapshotCategory, 0, len(snapshot.Categories))
for _, c := range snapshot.Categories {
if c.Kind != coredata.CookieCategoryKindUncategorised {
categories = append(categories, c)
}
}
texts := make(map[string]string)
if t, ok := translations[resolvedLang]; ok {