Don't generate empty tags when clearing semantics in picker (#806)

Fixes #690.

Signed-off-by: Yannick Schaus <github@schaus.net>
pull/817/head
Yannick Schaus 2021-01-14 15:08:46 +01:00 committed by GitHub
parent 3373e1e2c5
commit 942512e6ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -56,6 +56,7 @@ export default {
this.semanticClass = value
}
this.item.tags = this.item.tags.filter((t) => !this.semanticType(t) && !this.isSemanticPropertyTag(t))
if (!value) return
this.item.tags.push(this.semanticClass)
if (this.semanticType(this.semanticClass) === 'Point' && this.semanticProperty.length) {
this.item.tags.push(this.semanticProperty)