mirror of
https://github.com/community-scripts/ProxmoxVE-Local.git
synced 2026-04-24 20:25:50 +03:00
[PR #321] [MERGED] Fix selectedRepositories undefined error with generic filter validation #358
Labels
No labels
bug
enhancement
enhancement
feature
in progress
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ProxmoxVE-Local#358
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/321
Author: @michelroegl-brunner
Created: 11/14/2025
Status: ✅ Merged
Merged: 11/14/2025
Merged by: @MickLesk
Base:
main← Head:fix/320📝 Commits (1)
ff26c54Fix selectedRepositories undefined error with generic filter validation📊 Changes
4 files changed (+52 additions, -26 deletions)
View changed files
📝
src/app/_components/DownloadedScriptsTab.tsx(+3 -9)📝
src/app/_components/FilterBar.tsx(+2 -8)📝
src/app/_components/ScriptsGrid.tsx(+3 -9)➕
src/app/_components/filterUtils.ts(+44 -0)📄 Description
Fixes/Prevents issues like #320 in the future.
Problem
Users were experiencing
TypeError: can't access property "length", selectedRepositories is undefinedwhen loading saved filters that were created before theselectedRepositoriesproperty was added.Solution
Created a generic filter validation utility that:
Changes
filterUtils.tswithgetDefaultFilters()andmergeFiltersWithDefaults()functionsScriptsGrid.tsx,DownloadedScriptsTab.tsx, andFilterBar.tsxto use the utility functionsmergeFiltersWithDefaults()to ensure complete FilterState objectsBenefits
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.