Skip to content

Commit 0b2e7ae

Browse files
committed
fix: remove then on promise since using await
1 parent 290fe8e commit 0b2e7ae

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/components/v2/values/chartValuesDiff/ChartValuesView.utils.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,20 @@ export const updateGeneratedManifest = async (
120120
})
121121

122122
if (isUnlinkedCLIApp) {
123-
await getDeploymentManifestDetails(appId, deploymentVersion, isExternalApp).then(
124-
(response: ChartDeploymentManifestDetailResponse) => {
125-
dispatch({
126-
type: ChartValuesViewActionTypes.multipleOptions,
127-
payload: {
128-
generatedManifest: response.result.manifest,
129-
valuesYamlUpdated: false,
130-
valuesEditorError: '',
131-
generatingManifest: false,
132-
},
133-
})
134-
},
123+
const response: ChartDeploymentManifestDetailResponse = await getDeploymentManifestDetails(
124+
appId,
125+
deploymentVersion,
126+
isExternalApp,
135127
)
128+
dispatch({
129+
type: ChartValuesViewActionTypes.multipleOptions,
130+
payload: {
131+
generatedManifest: response.result.manifest,
132+
valuesYamlUpdated: false,
133+
valuesEditorError: '',
134+
generatingManifest: false,
135+
},
136+
})
136137

137138
return
138139
}
@@ -168,7 +169,6 @@ export const getAndUpdateSchemaValue = (
168169
dispatch: (action: ChartValuesViewAction) => void,
169170
): void => {
170171
const parsedValuesYamlDocument = YAML.parseDocument(modifiedValuesYaml || '')
171-
// TODO: can add unit testing here?
172172
dispatch({
173173
type: ChartValuesViewActionTypes.multipleOptions,
174174
payload: {

0 commit comments

Comments
 (0)