Fixed creating root category item

This commit is contained in:
Zakary Timson 2018-07-14 19:59:54 -04:00
parent fa4fae2517
commit 1a66c2d58b

View File

@ -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());
}
}