Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fastsearch params bug fix #1033

Merged

Conversation

bentonw414
Copy link
Contributor

i.e. if params.fuseOpts.threshold is 0.0 or params.fuseOpts.ignorelocation is false, the default values of 0.4 and true will still be used.

What does this PR change? What problem does it solve?

Changing the code for grabbing the fuse parameters to use the nullish coalescing operator instead of doing boolean coercion, since boolean coercion prevents certain values from being propagated.

I.e. params.fuseOpts.ignorelocation ? params.fuseOpts.ignorelocation: true will always be true. I don't think I have seen this discussed, and just happened to find the bug while working with the theme :)

Was the change discussed in an issue or in the Discussions before?

PR Checklist

  • This change adds/updates translations and I have used the template present here.
  • I have enabled maintainer edits for this PR.
  • I have verified that the code works as described/as intended.
  • This change adds a Social Icon which has a permissive license to use it.
  • This change does not include any CDN resources/links.
  • This change does not include any unrelated scripts such as bash and python scripts.
  • This change updates the overridden internal templates from HUGO's repository.

i.e. if params.fuseOpts.threshold is 0.0 or params.fuseOpts.ignorelocation is false, the default values of 0.4 and true will still be used.
@sonarcloud
Copy link

sonarcloud bot commented Sep 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adityatelange adityatelange merged commit 1f0f294 into adityatelange:master Sep 2, 2022
minyeamer pushed a commit to minyeamer/hugo-PaperMod that referenced this pull request Sep 16, 2022
RoneoOrg added a commit to RoneoOrg/hugo-theme-offTheRecord that referenced this pull request Sep 30, 2022
* upstream/master: (51 commits)
  [PATCH] Fix date format in schema and opengraph templates
  Fix error with profileMode imageUrl on Windows devices when imageUrl was set with external link resources.Get throws an error
  Use Nullish Coalescing Operator with Fastsearch (adityatelange#1033)
  Update bug report template
  add sketchfab icon (adityatelange#998)
  Fix spotify icon svg (adityatelange#997)
  Updating pagination strings for de (adityatelange#1024)
  Add icons for AniList and osu! (adityatelange#1022)
  Fix spacing around `rawhtml` shortcode (adityatelange#1018)
  Add param 'hiddenInHomeList' to hide certain post from home page
  Fix Code Smell: Unexpected var, use let or const instead.
  Add social icons for DeviantArt and Patreon (adityatelange#1013)
  Adding threema as social icon (adityatelange#1012)
  Feat: Add page nums in list pages
  pages: use github actions as build source - remove older build config (Classic Pages)
  Add more ja translations (adityatelange#1004)
  Updating pagination strings for bn: (adityatelange#1002)
  Add optional custom "title" for social links (adityatelange#999)
  Add a meta tag for naver site verification (adityatelange#991)
  add vimeo icon (adityatelange#975)
  ...
dunklecat pushed a commit to dunklecat/hugo-PaperModX that referenced this pull request Oct 9, 2022
kylethedeveloper pushed a commit to kylethedeveloper/hugo-PaperMod that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants