From a12fc981bb814dfc155c76bb73296474e7f7f26b Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Tue, 8 Oct 2019 13:11:13 +0530 Subject: [PATCH] fix: instanceof BaseDocument --- model/document.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/document.js b/model/document.js index 258378a8..d2e7d762 100644 --- a/model/document.js +++ b/model/document.js @@ -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); } }