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 {
1010 new Set ( ) ;
1111 private lastState : Buffer | null = null ;
1212
13- getArray ( key : string ) : Array {
13+ getArray ( key = "" ) : Array {
1414 if ( this . cachedArray . has ( key ) ) {
1515 return this . cachedArray . get ( key ) ! ;
1616 }
@@ -19,7 +19,7 @@ export class Doc extends Y.Doc {
1919 return yarray ;
2020 }
2121
22- getMap ( key : string ) : Map {
22+ getMap ( key = "" ) : Map {
2323 if ( this . cachedMap . has ( key ) ) {
2424 return this . cachedMap . get ( key ) ! ;
2525 }
@@ -28,7 +28,7 @@ export class Doc extends Y.Doc {
2828 return ymap ;
2929 }
3030
31- getText ( key : string ) : Text {
31+ getText ( key = "" ) : Text {
3232 return this . getOrCreateText ( key ) ;
3333 }
3434
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ test("testClientIdDuplicateChange", (t) => {
5050 t . assert ( doc2 . clientId !== doc1 . clientId ) ;
5151} ) ;
5252
53- test . skip ( "testGetTypeEmptyId" , ( t ) => {
53+ test ( "testGetTypeEmptyId" , ( t ) => {
5454 const doc1 = new Y . Doc ( ) ;
5555 doc1 . getText ( "" ) . insert ( 0 , "h" ) ;
5656 doc1 . getText ( ) . insert ( 1 , "i" ) ;
You can’t perform that action at this time.
0 commit comments