This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ type LiveBeaconsState = {
42
42
onStopSharing ?: ( ) => void ;
43
43
stoppingInProgress ?: boolean ;
44
44
} ;
45
+
45
46
const useLiveBeacons = ( roomId : Room [ 'roomId' ] ) : LiveBeaconsState => {
46
47
const [ stoppingInProgress , setStoppingInProgress ] = useState ( false ) ;
47
48
const liveBeaconIds = useEventEmitterState (
@@ -53,7 +54,7 @@ const useLiveBeacons = (roomId: Room['roomId']): LiveBeaconsState => {
53
54
// reset stopping in progress on change in live ids
54
55
useEffect ( ( ) => {
55
56
setStoppingInProgress ( false ) ;
56
- } , [ liveBeaconIds , setStoppingInProgress ] ) ;
57
+ } , [ liveBeaconIds ] ) ;
57
58
58
59
if ( ! liveBeaconIds ?. length ) {
59
60
return { liveBeaconIds } ;
Original file line number Diff line number Diff line change @@ -164,12 +164,12 @@ export class OwnBeaconStore extends AsyncStoreWithClient<OwnBeaconStoreState> {
164
164
} ;
165
165
166
166
private checkLiveness = ( ) : void => {
167
- const prevLiveness = this . getLiveBeaconIds ( ) ;
167
+ const prevLiveBeaconIds = this . getLiveBeaconIds ( ) ;
168
168
this . liveBeaconIds = [ ...this . beacons . values ( ) ]
169
169
. filter ( beacon => beacon . isLive )
170
170
. map ( beacon => beacon . identifier ) ;
171
171
172
- if ( arrayHasDiff ( prevLiveness , this . liveBeaconIds ) ) {
172
+ if ( arrayHasDiff ( prevLiveBeaconIds , this . liveBeaconIds ) ) {
173
173
this . emit ( OwnBeaconStoreEvent . LivenessChange , this . liveBeaconIds ) ;
174
174
}
175
175
} ;
You can’t perform that action at this time.
0 commit comments