fix(app): avoid 'no label' error when deleting external app [EE-6019] (#11673)

pull/11700/head
Ali 7 months ago committed by GitHub
parent d70812be0d
commit 2856d0ed64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -95,7 +95,7 @@ class KubernetesApplicationsController {
} else {
await this.KubernetesApplicationService.delete(application);
if (application.Metadata.labels[KubernetesPortainerApplicationStackNameLabel]) {
if (application.Metadata.labels && application.Metadata.labels[KubernetesPortainerApplicationStackNameLabel]) {
// Update applications in stack
const stack = this.state.stacks.find((x) => x.Name === application.StackName);
const index = stack.Applications.indexOf(application);

Loading…
Cancel
Save