mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 15:08:23 +02:00
Fix failing preset validation function
This commit is contained in:
@@ -25,10 +25,10 @@ function rp(f) {
|
||||
}
|
||||
|
||||
function validate(file, instance, schema) {
|
||||
var result = jsonschema.validate(instance, schema);
|
||||
if (result.length) {
|
||||
var validationErrors = jsonschema.validate(instance, schema).errors;
|
||||
if (validationErrors.length) {
|
||||
console.error(file + ": ");
|
||||
result.forEach(function(error) {
|
||||
validationErrors.forEach(function(error) {
|
||||
if (error.property) {
|
||||
console.error(error.property + ' ' + error.message);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user