Skip to content

Commit

Permalink
fix: loose option default to true (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuanddd authored Jun 23, 2022
1 parent 821b39f commit 3704cb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/cold-masks-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sajari/react-search-ui': patch
---

Fix the loose option having falsy default value
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const TemplateResults = (props: TemplateResultsProps) => {
keys.push('variantIndex');
const keysStringified = keys.join(',');
const render = useMemo(
() => compile(resultTemplate.html, { async: false, props: keys, blocks, loose: !!resultTemplate.loose }),
() => compile(resultTemplate.html, { async: false, props: keys, blocks, loose: resultTemplate.loose ?? true }),
[resultTemplate.html, keysStringified],
);

Expand Down

0 comments on commit 3704cb2

Please sign in to comment.