Fixed creating root category item
This commit is contained in:
parent
fa4fae2517
commit
1a66c2d58b
@ -29,7 +29,7 @@ export class NewCategoryComponent {
|
||||
if (!this.data) {
|
||||
this.db
|
||||
.collection('categories')
|
||||
.add({name: this.name, parent: this.parent, image: this.image})
|
||||
.add({name: this.name, image: this.image, parent: this.parent == 'root' ? null : this.parent})
|
||||
.then(data => this.dialogRef.close());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user