File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ type InfoShareRecord = {
7474 data : Record < string , unknown >
7575 theme : ThemeName
7676 when : Date
77+ gamemode ?: undefined
7778}
7879
7980/** Keep in sync with Go's share.Record */
@@ -99,7 +100,7 @@ export async function getShareContent(
99100 { record, location : { protocol, host } } : ShareContentParams ,
100101 validSession : boolean
101102) : Promise < ShareData > {
102- if ( ! ( 'gamemode' in record ) ) {
103+ if ( ! ( 'gamemode' in record ) || ! record . gamemode ) {
103104 const [ [ key , value ] ] = entries ( record . data )
104105
105106 return {
@@ -153,7 +154,7 @@ export async function getShareContent(
153154 text = 'Do you have the fastest fingers in the world? Or at least faster than mine?'
154155 break
155156 default :
156- throw new UnreachableError ( record . gamemode , 'unimplemented gamemode' )
157+ throw new UnreachableError ( record , 'unimplemented gamemode' )
157158 }
158159
159160 return {
You can’t perform that action at this time.
0 commit comments