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:
parent
6197e78514
commit
b96902bd83
@ -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(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user