mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-26 01:51:40 +00:00
[Client] Fix issue with clearing multitag buffer (#1299)
* fix improper state reference * add parentheses for clarity * fix buffer array reactivity + loop optimization
This commit is contained in:
@@ -28,7 +28,7 @@ const calculateStdDev = (values: number[]): number => {
|
||||
};
|
||||
const resetCurrentBuffer = () => {
|
||||
// Need to clear the array in place
|
||||
while (useStateStore().currentMultitagBuffer?.length != 0) useStateStore().currentMultitagBuffer?.pop();
|
||||
if (useStateStore().currentMultitagBuffer) useStateStore().currentMultitagBuffer!.length = 0;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user