Skip to content

Commit

Permalink
add type casting for categories with mandatory properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashwin Kumar committed Jan 29, 2025
1 parent dd75f4e commit c63d1d6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/core/src/parseAmplifyOutputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,7 @@ export function parseAmplifyOutputs(
}

if (amplifyOutputs.analytics) {
resourcesConfig.Analytics = parseAnalytics(
amplifyOutputs.analytics as AmplifyOutputsAnalyticsProperties,
);
resourcesConfig.Analytics = parseAnalytics(amplifyOutputs.analytics);
}

if (amplifyOutputs.geo) {
Expand All @@ -326,9 +324,7 @@ export function parseAmplifyOutputs(
}

if (amplifyOutputs.custom) {
const customConfig = parseCustom(
amplifyOutputs.custom as AmplifyOutputsCustomProperties,
);
const customConfig = parseCustom(amplifyOutputs.custom);

if (customConfig && 'Events' in customConfig) {
resourcesConfig.API = { ...resourcesConfig.API, ...customConfig };
Expand Down

0 comments on commit c63d1d6

Please sign in to comment.