2
0
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:
Faris Ansari 2019-10-08 13:11:13 +05:30
parent 216e70a132
commit a12fc981bb

View File

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