1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +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

@ -84,12 +84,12 @@ function Option(props: OptionProps<GpuOption, true>) {
export function Gpu({
values,
onChange,
gpus,
gpus = [],
usedGpus = [],
usedAllGpus,
}: Props) {
const options = useMemo(() => {
const options = gpus.map((gpu) => ({
const options = (gpus || []).map((gpu) => ({
value: gpu.value,
label:
usedGpus.includes(gpu.value) || usedAllGpus