Do not use array.includes to support some older versions of node
This commit is contained in:
parent
005941731b
commit
37b0ac9aec
3 changed files with 3 additions and 3 deletions
|
@ -304,7 +304,7 @@ router.post('/field/:listId', (req, res) => {
|
|||
type: (input.TYPE || '').toString().toLowerCase().trim(),
|
||||
group: Number(input.GROUP) || null,
|
||||
groupTemplate: (input.GROUP_TEMPLATE || '').toString().toLowerCase().trim(),
|
||||
visible: !['false', 'no', '0', ''].includes((input.VISIBLE || '').toString().toLowerCase().trim())
|
||||
visible: ['false', 'no', '0', ''].indexOf((input.VISIBLE || '').toString().toLowerCase().trim()) < 0
|
||||
};
|
||||
|
||||
fields.create(list.id, field, (err, id, tag) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue