Skip to content

Commit

Permalink
reapply the "clearer variable name" commit
Browse files Browse the repository at this point in the history
This change was removed by mistake, probably because of a conflict error
  • Loading branch information
BenoitZugmeyer committed Sep 15, 2023
1 parent 3a7384d commit e4853e1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/rum/src/domain/deflate/deflateEncoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ export function createDeflateEncoder(
configuration,
worker,
'message',
({ data }: MessageEvent<DeflateWorkerResponse>) => {
if (data.type !== 'wrote' || data.streamId !== streamId) {
({ data: workerResponse }: MessageEvent<DeflateWorkerResponse>) => {
if (workerResponse.type !== 'wrote' || workerResponse.streamId !== streamId) {
return
}

rawBytesCount += data.additionalBytesCount
compressedData.push(data.result)
compressedDataTrailer = data.trailer
rawBytesCount += workerResponse.additionalBytesCount
compressedData.push(workerResponse.result)
compressedDataTrailer = workerResponse.trailer

const nextPendingAction = pendingWriteActions.shift()
if (nextPendingAction && nextPendingAction.id === data.id) {
if (nextPendingAction && nextPendingAction.id === workerResponse.id) {
if (nextPendingAction.writeCallback) {
nextPendingAction.writeCallback(data.result.byteLength)
nextPendingAction.writeCallback(workerResponse.result.byteLength)
} else if (nextPendingAction.finishCallback) {
nextPendingAction.finishCallback()
}
Expand Down

0 comments on commit e4853e1

Please sign in to comment.