Merge pull request #10123 from takuy/patch-1

Fixed #9928: update expected field name for response list
This commit is contained in:
snipe 2021-09-23 18:57:02 -07:00 committed by GitHub
commit d37dedb654
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -296,11 +296,11 @@ $(document).ready(function () {
});
// makes sure we're not selecting the same thing twice for multiples
var filteredResponse = response.items.filter(function(item) {
var filteredResponse = response.results.filter(function(item) {
return currentlySelected.indexOf(+item.id) < 0;
});
var first = (currentlySelected.length > 0) ? filteredResponse[0] : response.items[0];
var first = (currentlySelected.length > 0) ? filteredResponse[0] : response.results[0];
if(first && first.id) {
first.selected = true;
@ -558,4 +558,4 @@ $(document).ready(function () {
});
};
})(jQuery);
})(jQuery);