diff --git a/packages/amplify-cli/src/context-manager.ts b/packages/amplify-cli/src/context-manager.ts index aa2eec0cfac..eb1bd778a05 100644 --- a/packages/amplify-cli/src/context-manager.ts +++ b/packages/amplify-cli/src/context-manager.ts @@ -36,7 +36,7 @@ const getProjectSettings = (): ProjectSettings => { const projectConfig = stateManager.getProjectConfig(); const frontend = projectConfig['frontend']; projectSettings.frontend = frontend; - projectSettings.framework = projectConfig?.[frontend].framework; + projectSettings.framework = projectConfig?.frontend?.framework; } if (stateManager.localEnvInfoExists()) {