fix(tag-editor) cast to boolean (#3982)

* fix(tag-editor) cast to boolean

* Update packages/insomnia-app/app/ui/components/templating/tag-editor.tsx

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
This commit is contained in:
Jack Kavanagh 2021-08-31 21:57:17 +02:00 committed by GitHub
parent 5f06350fb8
commit a6e52d97aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -732,7 +732,7 @@ class TagEditor extends PureComponent<Props, State> {
let finalPreview = preview;
if (activeTagDefinition && activeTagDefinition.disablePreview) {
if (activeTagDefinition?.disablePreview) {
finalPreview = activeTagDefinition.disablePreview(activeTagData.args)
? preview.replace(/./g, '*')
: preview;
@ -767,12 +767,13 @@ class TagEditor extends PureComponent<Props, State> {
</select>
</label>
</div>
{activeTagDefinition &&
activeTagDefinition.args.map((argDefinition: NunjucksParsedTagArg, index) =>
this.renderArg(argDefinition, activeTagData.args, index),
)}
{activeTagDefinition?.args.map((argDefinition: NunjucksParsedTagArg, index) =>
this.renderArg(argDefinition, activeTagData.args, index),
)}
{activeTagDefinition?.actions?.length && this.renderActions(activeTagDefinition.actions)}
{activeTagDefinition?.actions && activeTagDefinition?.actions?.length > 0 ? (
this.renderActions(activeTagDefinition.actions)
) : null}
{!activeTagDefinition && (
<div className="form-control form-control--outlined">