Browse Source

improved error checking

pull/251/head
Peter Johnson 9 years ago
parent
commit
e532c2a88a
  1. 5
      sanitiser/_geo_common.js

5
sanitiser/_geo_common.js

@ -1,7 +1,8 @@
/** /**
* helper sanitiser methods for geo parameters * helper sanitiser methods for geo parameters
*/ */
var util = require( 'util' ); var util = require('util'),
check = require('check-types');
/** /**
* Parse and validate bbox parameter * Parse and validate bbox parameter
@ -13,7 +14,7 @@ var util = require( 'util' );
* @param {object} clean * @param {object} clean
*/ */
function sanitize_bbox( unclean, clean ) { function sanitize_bbox( unclean, clean ) {
if( !unclean.bbox ) { if( !check.unemptyString( unclean.bbox ) ) {
return; return;
} }

Loading…
Cancel
Save