Skip to content

Commit

Permalink
feat(plugin): fix variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdmomo committed Jul 27, 2021
1 parent 631f7b3 commit c11f0fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/src/components/Plugin/UI/referer-restriction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ const removeBtnStyle = {
const RefererRestriction: React.FC<Props> = ({ form, schema }) => {
const { formatMessage } = useIntl()
const properties = schema?.properties
const whiteMinLen = properties.whitelist.minItems
const whiteInit = Array(whiteMinLen).join('.').split('.')
const allowListMinLength = properties.whitelist.minItems
const whiteInit = Array(allowListMinLength).join('.').split('.')
return (
<Form
form={form}
Expand Down Expand Up @@ -90,14 +90,14 @@ const RefererRestriction: React.FC<Props> = ({ form, schema }) => {
</Form.Item>
</Col>
<Col style={{ ...removeBtnStyle, marginLeft: -10 }}>
{fields.length > whiteMinLen ? (
{fields.length > allowListMinLength &&
<MinusCircleOutlined
className="dynamic-delete-button"
onClick={() => {
remove(field.name);
}}
/>
) : null}
}
</Col>
</Row>
))}
Expand Down

0 comments on commit c11f0fb

Please sign in to comment.