Don't create a label through quick add if the title is empty

This commit is contained in:
kolaente 2020-09-28 20:20:19 +02:00
parent e507bd78ef
commit 21968ab86d
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -262,6 +262,11 @@ export default {
// The part up until the next space // The part up until the next space
const labelTitle = p.split(' ')[0] const labelTitle = p.split(' ')[0]
// Don't create an empty label
if (labelTitle === '') {
return
}
// Check if the label exists // Check if the label exists
this.labelService.getAll({}, {s: labelTitle}) this.labelService.getAll({}, {s: labelTitle})
.then(res => { .then(res => {