mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user