Skip to content

Commit 4d95a43

Browse files
authored
🔥 Remove duplicate this.type = null assigment (#691)
At the moment in constructor we call ```js this.type = null ``` twice. Let's remove one of the calls
1 parent ca50594 commit 4d95a43

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/client/doc.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ function Doc(connection, collection, id) {
6161
this.id = id;
6262

6363
this.version = null;
64+
// The OT type of this document. An uncreated document has type `null`
6465
this.type = null;
6566
this.data = undefined;
6667

@@ -93,9 +94,6 @@ function Doc(connection, collection, id) {
9394
// This is a list of {[create:{...}], [del:true], [op:...], callbacks:[...]}
9495
this.pendingOps = [];
9596

96-
// The OT type of this document. An uncreated document has type `null`
97-
this.type = null;
98-
9997
// The applyStack enables us to track any ops submitted while we are
10098
// applying an op incrementally. This value is an array when we are
10199
// performing an incremental apply and null otherwise. When it is an array,

0 commit comments

Comments
 (0)