Skip to content

Commit

Permalink
refactor: add additional check for repo load func
Browse files Browse the repository at this point in the history
  • Loading branch information
Obnoxieux committed Feb 16, 2024
1 parent fcce198 commit 6fe2ceb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/routes/projects/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
let shownLanguage: string = "All"
let languages: Array<string> = ["All"]
data.repos.forEach((repo: GitHubRepo) => {
languages.push(repo.language)
})
if (Array.isArray(data.repos)) {
data.repos.forEach((repo: GitHubRepo) => {
languages.push(repo.language)
})
}
let filters = new Set<string>(languages)
let filteredRepos: GitHubRepo[] = data.repos
Expand Down

0 comments on commit 6fe2ceb

Please sign in to comment.