mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-03-04 13:00:36 +00:00
idk why React would schedule a rerender there if value is the same
This commit is contained in:
parent
0fba24e161
commit
8d015402bd
22 changed files with 22 additions and 22 deletions
|
|
@ -140,7 +140,7 @@ export function CamerasProvider({ children }: { children: ReactNode }) {
|
|||
[registerCamera, unregisterCamera, nextCamera, setCamera, cameraCount],
|
||||
);
|
||||
|
||||
if (cameraCount === 0) {
|
||||
if (cameraCount === 0 && cameraIndex !== -1) {
|
||||
setCameraIndex(-1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue