Add extra check that a feature is added on the right level; automatically add the right level to a new point

This commit is contained in:
Pieter Vander Vennet 2022-07-25 16:55:44 +02:00
parent 038b2ece4c
commit effd75e95c
8 changed files with 140 additions and 46 deletions

View file

@ -72,7 +72,7 @@ export default class CreateNewNodeAction extends OsmCreateAction {
this.setElementId(id)
for (const kv of this._basicTags) {
if (typeof kv.value !== "string") {
throw "Invalid value: don't use a regex in a preset"
throw "Invalid value: don't use non-string value in a preset. The tag "+kv.key+"="+kv.value+" is not a string, the value is a "+typeof kv.value
}
properties[kv.key] = kv.value;
}