1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-27 09:19:39 +02:00

fix(gpu): EE-3743 gpus null error (#7342)

This commit is contained in:
congs 2022-07-29 16:08:17 +12:00 committed by GitHub
parent ce22544c60
commit 44737029a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,7 @@ angular.module('portainer.docker').controller('DashboardController', [
$scope.buildGpusStr = function (gpuUseSet) {
var gpusAvailable = new Object();
for (let i = 0; i < $scope.endpoint.Gpus.length; i++) {
for (let i = 0; i < ($scope.endpoint.Gpus || []).length; i++) {
if (!gpuUseSet.has($scope.endpoint.Gpus[i].name)) {
var exist = false;
for (let gpuAvailable in gpusAvailable) {