refactor: add optional ids to environments (#2974)

This commit is contained in:
Akash K
2023-04-09 14:30:42 +05:30
committed by GitHub
parent 65a194a6d2
commit f1a812dae2
5 changed files with 98 additions and 12 deletions

View File

@@ -144,8 +144,9 @@ const deleteAction = ref<typeof HoppSmartItem>()
const removeEnvironment = () => {
if (props.environmentIndex === null) return
if (props.environmentIndex !== "Global")
deleteEnvironment(props.environmentIndex)
if (props.environmentIndex !== "Global") {
deleteEnvironment(props.environmentIndex, props.environment.id)
}
toast.success(`${t("state.deleted")}`)
}