mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
fix: instanceof BaseDocument
This commit is contained in:
parent
216e70a132
commit
a12fc981bb
@ -108,10 +108,10 @@ module.exports = class BaseDocument extends Observable {
|
||||
}
|
||||
|
||||
initDoc(data) {
|
||||
if (data.prototype instanceof Document) {
|
||||
if (data.prototype instanceof BaseDocument) {
|
||||
return data;
|
||||
} else {
|
||||
return new Document(data);
|
||||
return new BaseDocument(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user