diff --git a/src/components/admin/QueryBuilderTab.tsx b/src/components/admin/QueryBuilderTab.tsx index ce7bded..b875675 100644 --- a/src/components/admin/QueryBuilderTab.tsx +++ b/src/components/admin/QueryBuilderTab.tsx @@ -108,7 +108,9 @@ export default function QueryBuilderTab({ value: string, ) => { const updated = [...whereConditions]; - updated[index][field] = value; + if (updated[index]) { + updated[index][field] = value; + } setWhereConditions(updated); }; diff --git a/src/utils/featureConfig.test.ts b/src/utils/featureConfig.test.ts index afe0cf5..45cc3de 100644 --- a/src/utils/featureConfig.test.ts +++ b/src/utils/featureConfig.test.ts @@ -90,8 +90,8 @@ describe('FeatureConfig', () => { it('should return undefined for disabled feature', () => { // This test assumes there might be disabled features in the config const features = getFeatures(); - const enabledIds = features.map(f => f.id); - + const _enabledIds = features.map(f => f.id); + // Try to get a feature that doesn't exist in enabled list const disabledFeature = getFeatureById('disabled-test-feature'); expect(disabledFeature).toBeUndefined();