Don't call ensureSRS contents when only_validate is true. Fixes #30.

This commit is contained in:
Tom MacWright 2011-04-29 15:13:06 -04:00
parent 13b62bfc15
commit 4535fe09f1

View File

@ -30,6 +30,10 @@ carto.Renderer = function Renderer(env) {
// - @param {Object} m map object.
// - @param {Function} callback
ensureSRS: function(m, callback) {
if (env.only_validate === true) {
callback(null, m);
return;
}
Step(
function autodetectSRS() {
var group = this.group();
@ -202,7 +206,7 @@ carto.Renderer = function Renderer(env) {
that.env,
this.env
), { filename: result[0] });
new carto.Parser(parse_env).parse(result[1],
(new carto.Parser(parse_env)).parse(result[1],
function(err, tree) {
if (env.benchmark) console.warn('Parsing time: '
+ ((new Date - parsingTime))