fix error message 🐛

This commit is contained in:
Jannis R 2018-05-03 10:29:43 +02:00
parent 8ce89f0fe6
commit 47aea604df
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -7,7 +7,7 @@ const formatLocation = (profile, l, name = 'location') => {
if ('string' === typeof l.id) return profile.formatPoi(l)
if ('string' === typeof l.address) return profile.formatAddress(l)
if (!l.type) throw new Error(`missing ${name}.type`)
throw new Error(`invalid ${name}type: ${l.type}`)
throw new Error(`invalid ${name}.type: ${l.type}`)
}
throw new Error(name + ': valid station, address or poi required.')
}