aboutsummaryrefslogtreecommitdiffstats
path: root/clients/common/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'clients/common/common.go')
-rw-r--r--clients/common/common.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/clients/common/common.go b/clients/common/common.go
index ef35440..a6f6166 100644
--- a/clients/common/common.go
+++ b/clients/common/common.go
@@ -99,7 +99,10 @@ func (c *Capabilities) Get(capability string) *Capability {
// Set sets a capability removing the values
func (c *Capabilities) Set(capability string, values ...string) {
- delete(c.m, capability)
+ if _, ok := c.m[capability]; ok {
+ delete(c.m, capability)
+ }
+
c.Add(capability, values...)
}