[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:
Devon Doyle
2024-03-22 20:19:51 -04:00
committed by GitHub
parent 2d8b1ec66d
commit 010688006a
2 changed files with 3 additions and 2 deletions

View File

@@ -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>