module.exports = (req, res, next) => {
  const postcode = req.body.uk_postcode
  req.body.uk_postcode = postcode && postcode.split(',')
  next()
}

module.exports = (req, res, next) => {
  const postcode = req.body.uk_postcode
  req.body.uk_postcode =
    postcode && postcode.split(',').filter((x) => !x.match(/^\s*$/))
  next()
}

Fix a bug with trailing commas in postcode filter
Fix a bug with trailing commas in postcode filter
