optimize fm (#82)

* optimize fm

* chore: auto-fix linting and formatting issues

* fix: type

* chore: auto-fix linting and formatting issues

---------

Co-authored-by: uubulb <uubulb@users.noreply.github.com>
Co-authored-by: naiba <hi@nai.ba>
Co-authored-by: naiba <naiba@users.noreply.github.com>
This commit is contained in:
UUBulb
2024-12-29 22:19:50 +08:00
committed by GitHub
co-authored by uubulb naiba naiba
parent 97a5deb648
commit 01add8b160
12 changed files with 164 additions and 120 deletions
+2 -3
View File
@@ -38,9 +38,8 @@ onmessage = async function (event) {
throw new Error("accessHandle is undefined")
}
const dataChunk = arrayBuffer
accessHandle.write(dataChunk, { at: receivedLength })
receivedLength += dataChunk.byteLength
accessHandle.write(arrayBuffer, { at: receivedLength })
receivedLength += arrayBuffer.byteLength
if (receivedLength === expectedLength) {
accessHandle.flush()