mirror of
https://github.com/frappe/books.git
synced 2024-12-24 20:00:29 +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();
|
await this.fetchDoc();
|
||||||
|
|
||||||
// setup the title field
|
// 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) {
|
if (!this.titleField.readOnly) {
|
||||||
this.doc.set(this.titleField.fieldname, '');
|
this.doc.set(this.titleField.fieldname, '');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user