Make the validation in the correct place

This commit is contained in:
Francisco López 2017-02-03 15:58:56 +01:00
parent 0c1990f655
commit 510847a3b2

View File

@ -209,12 +209,6 @@ CartoCSS.prototype = {
var value = rule.value.value[0].value[0].value.value;
this.imageURLs.push(value);
}
rule.toXML(parse_env, {});
}
if (this.options.strict && parse_env.errors.message) {
throw new Error(parse_env.errors.message);
}
layer.frames = [];
@ -244,6 +238,13 @@ CartoCSS.prototype = {
var done = {};
for(var i = 0; i < defs.length; ++i) {
var def = defs[i];
def.toXML(parse_env, {});
if (this.options.strict && parse_env.errors.message) {
throw new Error(parse_env.errors.message);
}
var k = defKey(def);
var layer = layers[k];
if(!done[k]) {