Skip to content

Commit

Permalink
html: Accept boolean in template, as well as string and number
Browse files Browse the repository at this point in the history
As discussed back in 4851f34, the values get stringified either
by `lodash.escape` or by the `join`.  Stringifying a boolean works
just as nicely as a number.
  • Loading branch information
gnprice committed Nov 16, 2023
1 parent 4b47e53 commit 12e8e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webview/html/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import escape from 'lodash.escape';
*/
export default (
strings: $ReadOnlyArray<string>,
...values: $ReadOnlyArray<string | number>
...values: $ReadOnlyArray<string | number | boolean>
): string => {
// $FlowIssue[prop-missing] #2616 github.com/facebook/flow/issues/2616
const raw: $ReadOnlyArray<string> = strings.raw;
Expand Down

0 comments on commit 12e8e7d

Please sign in to comment.