Make the validation in the correct place
This commit is contained in:
parent
0c1990f655
commit
510847a3b2
@ -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]) {
|
||||
|
Loading…
Reference in New Issue
Block a user