Commit 110fbb12 by benjaminapetersen

Update .length check in filters/annotation

parent 0133f657
......@@ -1113,7 +1113,7 @@ angular.module('openshiftCommonUI')
tagName = tagName || 'latest';
if (resource && resource.spec && resource.spec.tags){
var tags = resource.spec.tags;
for(var i=0; i < tags.length; ++i){
for(var i=0; i < _.size(tags); ++i){
var tag = tags[i];
if(tagName === tag.name && tag.annotations){
return tag.annotations[key];
......@@ -1141,7 +1141,6 @@ angular.module('openshiftCommonUI')
return (icon) ? icon : "fa fa-cube";
};
});
;'use strict';
angular
......
......@@ -1284,7 +1284,7 @@ angular.module('openshiftCommonUI')
tagName = tagName || 'latest';
if (resource && resource.spec && resource.spec.tags){
var tags = resource.spec.tags;
for(var i=0; i < tags.length; ++i){
for(var i=0; i < _.size(tags); ++i){
var tag = tags[i];
if(tagName === tag.name && tag.annotations){
return tag.annotations[key];
......@@ -1312,7 +1312,6 @@ angular.module('openshiftCommonUI')
return (icon) ? icon : "fa fa-cube";
};
}]);
;'use strict';
angular
......
......@@ -488,7 +488,7 @@ return null;
};
} ]).filter("imageStreamTagAnnotation", function() {
return function(resource, key, tagName) {
if (tagName = tagName || "latest", resource && resource.spec && resource.spec.tags) for (var tags = resource.spec.tags, i = 0; i < tags.length; ++i) {
if (tagName = tagName || "latest", resource && resource.spec && resource.spec.tags) for (var tags = resource.spec.tags, i = 0; i < _.size(tags); ++i) {
var tag = tags[i];
if (tagName === tag.name && tag.annotations) return tag.annotations[key];
}
......
......@@ -59,7 +59,7 @@ angular.module('openshiftCommonUI')
tagName = tagName || 'latest';
if (resource && resource.spec && resource.spec.tags){
var tags = resource.spec.tags;
for(var i=0; i < tags.length; ++i){
for(var i=0; i < _.size(tags); ++i){
var tag = tags[i];
if(tagName === tag.name && tag.annotations){
return tag.annotations[key];
......@@ -87,4 +87,3 @@ angular.module('openshiftCommonUI')
return (icon) ? icon : "fa fa-cube";
};
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment