refactor: enhance feature filtering in FeatureLoader

- Updated getPending method to ensure that only features with a defined status are included in the pending features list.
- Improved code readability by using a more concise filter function.

This change enhances the robustness of feature status handling.
This commit is contained in:
Kacper
2025-12-23 00:35:37 +01:00
parent 5ec19f11cd
commit 0bb9db5f80

View File

@@ -477,8 +477,8 @@ export class FeatureLoader {
async getPending(projectPath: string): Promise<Feature[]> {
try {
const allFeatures = await this.getAll(projectPath);
const pendingFeatures = allFeatures.filter((f) =>
['pending', 'ready', 'backlog'].includes(f.status)
const pendingFeatures = allFeatures.filter(
(f) => f.status && ['pending', 'ready', 'backlog'].includes(f.status)
);
// Resolve dependencies and order features