From 66c59c4624b7e788268987363b7aedae460ea7d0 Mon Sep 17 00:00:00 2001 From: Dawid Kisielwski <91346346+dawidreedsy@users.noreply.github.com> Date: Mon, 3 Mar 2025 14:53:33 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20duplicate=20this.type?= =?UTF-8?q?=20=3D=20null=20assigment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the moment in constructor we call ```js this.type = null ``` twice. Let's remove one of the calls --- lib/client/doc.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/client/doc.js b/lib/client/doc.js index acb457374..c0fb3b266 100644 --- a/lib/client/doc.js +++ b/lib/client/doc.js @@ -61,6 +61,7 @@ function Doc(connection, collection, id) { this.id = id; this.version = null; + // The OT type of this document. An uncreated document has type `null` this.type = null; this.data = undefined; @@ -93,9 +94,6 @@ function Doc(connection, collection, id) { // This is a list of {[create:{...}], [del:true], [op:...], callbacks:[...]} this.pendingOps = []; - // The OT type of this document. An uncreated document has type `null` - this.type = null; - // The applyStack enables us to track any ops submitted while we are // applying an op incrementally. This value is an array when we are // performing an incremental apply and null otherwise. When it is an array,