From e532c2a88a41fce7f0268e05bf24e999f871fb99 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Mon, 14 Sep 2015 16:26:04 +0200 Subject: [PATCH] improved error checking --- sanitiser/_geo_common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sanitiser/_geo_common.js b/sanitiser/_geo_common.js index 2ed92656..b53e13c3 100644 --- a/sanitiser/_geo_common.js +++ b/sanitiser/_geo_common.js @@ -1,7 +1,8 @@ /** * helper sanitiser methods for geo parameters */ -var util = require( 'util' ); +var util = require('util'), + check = require('check-types'); /** * Parse and validate bbox parameter @@ -13,7 +14,7 @@ var util = require( 'util' ); * @param {object} clean */ function sanitize_bbox( unclean, clean ) { - if( !unclean.bbox ) { + if( !check.unemptyString( unclean.bbox ) ) { return; }