forked from MapComplete/MapComplete
Scripts: add extra check on suggestions in fixSchemas
This commit is contained in:
parent
0a364c912b
commit
ed2d3f9020
1 changed files with 7 additions and 0 deletions
|
@ -227,6 +227,13 @@ function extractHintsFrom(
|
||||||
". Remember that you should use {'if': 'value=[actual_value]', 'then': '[some explanation]'}"
|
". Remember that you should use {'if': 'value=[actual_value]', 'then': '[some explanation]'}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
if (!hintElement.if || !hintElement.then) {
|
||||||
|
throw (
|
||||||
|
"A suggestion generated an object missing either `if` or `then` " +
|
||||||
|
path.join(".") +
|
||||||
|
". Remember that you should use {'if': 'value=[actual_value]', 'then': '[some explanation]'}"
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue