Do not use array.includes to support some older versions of node

This commit is contained in:
Andris Reinman 2016-12-08 13:49:31 +02:00
parent 005941731b
commit 37b0ac9aec
3 changed files with 3 additions and 3 deletions

View file

@ -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) => {