radar: assert north > south & east > west

This commit is contained in:
Jannis R 2018-05-16 21:53:33 +02:00
parent c9e77f3050
commit 0840d69ee9
No known key found for this signature in database
GPG key ID: 0FE83946296A88A5

View file

@ -316,6 +316,8 @@ const createClient = (profile, request = _request) => {
if ('number' !== typeof west) throw new Error('west must be a number.')
if ('number' !== typeof south) throw new Error('south must be a number.')
if ('number' !== typeof east) throw new Error('east must be a number.')
if (north <= south) throw new Error('north must be larger than south.')
if (east <= west) throw new Error('east must be larger than west.')
opt = Object.assign({
results: 256, // maximum number of vehicles