File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export const setupSubscription = createAsyncThunk(
3434 const batcher = new Batcher < SkyBrowserUpdate > ( updateData ) ;
3535
3636 ( async ( ) => {
37- for await ( const data of skybrowserTopic . iterator ( ) as AsyncGenerator < SkyBrowserUpdate > ) {
37+ for await ( const data of skybrowserTopic . iterator ( ) as AsyncIterable < SkyBrowserUpdate > ) {
3838 batcher . add ( data ) ;
3939 }
4040 } ) ( ) ;
@@ -47,7 +47,7 @@ function tearDownSubscription() {
4747 return ;
4848 }
4949 skybrowserTopic . talk ( {
50- event : 'stop_supscription '
50+ event : 'stop_subscription '
5151 } ) ;
5252 skybrowserTopic . cancel ( ) ;
5353}
Original file line number Diff line number Diff line change @@ -58,16 +58,10 @@ export const skyBrowserSlice = createSlice({
5858 typeof idx === 'string' ? parseInt ( idx ) : idx
5959 ) ;
6060 }
61- if ( action . payload . browsers !== undefined ) {
62- // Derived state for easier access
63- state . browserIds = Object . keys ( action . payload . browsers ) ?? [ ] ;
64- state . browserColors = state . browserIds . map (
65- ( id ) => action . payload . browsers ?. [ id ] . color ?? [ 255 , 255 , 255 ]
66- ) ;
67- state . browserNames = state . browserIds . map (
68- ( id ) => action . payload . browsers ?. [ id ] . name ?? 'Unnamed Browser'
69- ) ;
70- }
61+ // Derived state for easier access
62+ state . browserIds = Object . keys ( state . browsers ) ;
63+ state . browserColors = state . browserIds . map ( ( id ) => state . browsers [ id ] . color ) ;
64+ state . browserNames = state . browserIds . map ( ( id ) => state . browsers [ id ] . name ) ;
7165 } else {
7266 // If the update is invalid, reset the state
7367 state . selectedBrowserId = '' ;
You can’t perform that action at this time.
0 commit comments