2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00

fix: prevent cannot read prop of null

This commit is contained in:
18alantom 2021-12-02 15:46:46 +05:30
parent 6197e78514
commit b96902bd83

View File

@ -153,7 +153,7 @@ export default {
await this.fetchDoc();
// setup the title field
if (this.doc.isNew() && this.doc[this.titleField.fieldname]) {
if (this.doc && this.doc.isNew() && this.doc[this.titleField.fieldname]) {
if (!this.titleField.readOnly) {
this.doc.set(this.titleField.fieldname, '');
setTimeout(() => {