Skip to content

Commit

Permalink
Fix undefined crash
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 18, 2024
1 parent 8df9ba9 commit ac992c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/utils/get-provides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function get_provides(yml: any): string[] {
provides = []
const set = new Set()
for (const x of [darwin, linux, windows, star].flatMap(x => x)) {
if (!set.has(x)) {
if (!set.has(x) && x) {
provides.push(x)
set.add(x)
}
Expand Down
2 changes: 1 addition & 1 deletion src/pkgx.dev/PackageListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function get_provides(yml: any): string[] {
provides = []
const set = new Set()
for (const x of [darwin, linux, windows, star].flatMap(x => x)) {
if (!set.has(x)) {
if (!set.has(x) && x) {
provides.push(x)
set.add(x)
}
Expand Down

0 comments on commit ac992c7

Please sign in to comment.