mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
fix(secret-creation): prevent assignment of label with no name (#2838)
This commit is contained in:
parent
e5fd61044a
commit
845f4e912b
1 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,9 @@ angular.module('portainer.docker')
|
||||||
var labels = {};
|
var labels = {};
|
||||||
if (labelKV) {
|
if (labelKV) {
|
||||||
labelKV.forEach(function(label) {
|
labelKV.forEach(function(label) {
|
||||||
labels[label.key] = label.value;
|
if (label.key) {
|
||||||
|
labels[label.key] = label.value;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return labels;
|
return labels;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue