mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 18:40:34 -05:00
[WIP] Fix custom reports cold-reload crash (#2528)
* when custom reports were cold-reloaded, the selections would be null crashing the page * add release notes for PR * fix typo in release note file name
This commit is contained in:
@@ -45,10 +45,15 @@ export function CategorySelector({
|
||||
filteredGroup(categoryGroup).map(category => selectAll.push(category)),
|
||||
);
|
||||
|
||||
if (selectedCategories === undefined) {
|
||||
selectedCategories = categoryGroups.flatMap(cg => cg.categories);
|
||||
}
|
||||
|
||||
const selectedCategoryMap = useMemo(
|
||||
() => selectedCategories.map(selected => selected.id),
|
||||
[selectedCategories],
|
||||
);
|
||||
|
||||
const allCategoriesSelected = selectAll.every(category =>
|
||||
selectedCategoryMap.includes(category.id),
|
||||
);
|
||||
|
||||
6
upcoming-release-notes/2528.md
Normal file
6
upcoming-release-notes/2528.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [qedi-r]
|
||||
---
|
||||
|
||||
Fix custom report page cold-reload crash.
|
||||
Reference in New Issue
Block a user