File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ export class Doc extends Y.Doc {
10
10
new Set ( ) ;
11
11
private lastState : Buffer | null = null ;
12
12
13
- getArray ( key : string ) : Array {
13
+ getArray ( key = "" ) : Array {
14
14
if ( this . cachedArray . has ( key ) ) {
15
15
return this . cachedArray . get ( key ) ! ;
16
16
}
@@ -19,7 +19,7 @@ export class Doc extends Y.Doc {
19
19
return yarray ;
20
20
}
21
21
22
- getMap ( key : string ) : Map {
22
+ getMap ( key = "" ) : Map {
23
23
if ( this . cachedMap . has ( key ) ) {
24
24
return this . cachedMap . get ( key ) ! ;
25
25
}
@@ -28,7 +28,7 @@ export class Doc extends Y.Doc {
28
28
return ymap ;
29
29
}
30
30
31
- getText ( key : string ) : Text {
31
+ getText ( key = "" ) : Text {
32
32
return this . getOrCreateText ( key ) ;
33
33
}
34
34
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ test("testClientIdDuplicateChange", (t) => {
50
50
t . assert ( doc2 . clientId !== doc1 . clientId ) ;
51
51
} ) ;
52
52
53
- test . skip ( "testGetTypeEmptyId" , ( t ) => {
53
+ test ( "testGetTypeEmptyId" , ( t ) => {
54
54
const doc1 = new Y . Doc ( ) ;
55
55
doc1 . getText ( "" ) . insert ( 0 , "h" ) ;
56
56
doc1 . getText ( ) . insert ( 1 , "i" ) ;
You can’t perform that action at this time.
0 commit comments