Skip to content

Commit

Permalink
fix: hide the languages filter on monolingual site
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Feb 3, 2024
1 parent be96a62 commit 6679f12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/search/js/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class Form {
}

private renderLanguage(): string {
if (params.langs.length < 2) {
if (Object.keys(params.langs).length < 2) {
return ''
}

Expand Down Expand Up @@ -176,7 +176,7 @@ export default class Form {
})

this.language = this.ele.querySelector('.search-filter-lang') as HTMLElement
this.language.addEventListener('change', () => {
this.language?.addEventListener('change', () => {
this.submit()
})

Expand Down

0 comments on commit 6679f12

Please sign in to comment.