Skip to content

Commit

Permalink
fix: filter out ram sticks without a size
Browse files Browse the repository at this point in the history
  • Loading branch information
MauriceNino committed Jan 19, 2024
1 parent a1da8ad commit 0bf79fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apps/server/src/data/ram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ export default {

return {
size: memInfo.total,
layout: memLayout.map(({ manufacturer, type, clockSpeed }) => ({
brand: manufacturer,
type: type,
frequency: clockSpeed ?? undefined,
})),
layout: memLayout
.filter(({ size }) => size !== 0)
.map(({ manufacturer, type, clockSpeed }) => ({
brand: manufacturer,
type: type,
frequency: clockSpeed ?? undefined,
})),
};
},
};

0 comments on commit 0bf79fa

Please sign in to comment.