Skip to content

Commit

Permalink
[CodeFactor] Apply fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
code-factor committed Aug 8, 2023
1 parent fcffbf2 commit ffe47d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/dataconnection/BufferedConnection/BinaryPack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class BinaryPack extends BufferedConnection {

// Handles a DataChannel message.
protected override _handleDataMessage({ data }: { data: Uint8Array }): void {
let deserializedData = unpack(data);
const deserializedData = unpack(data);

// PeerJS specific message
const peerData = deserializedData["__peerData"];
Expand Down Expand Up @@ -93,7 +93,7 @@ export class BinaryPack extends BufferedConnection {
const blobs = this.chunker.chunk(blob);
logger.log(`DC#${this.connectionId} Try to send ${blobs.length} chunks...`);

for (let blob of blobs) {
for (const blob of blobs) {
this.send(blob, true);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/dataconnection/BufferedConnection/Json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class Json extends BufferedConnection {

// Handles a DataChannel message.
protected override _handleDataMessage({ data }: { data: Uint8Array }): void {
let deserializedData = this.parse(this.decoder.decode(data));
const deserializedData = this.parse(this.decoder.decode(data));

// PeerJS specific message
const peerData = deserializedData["__peerData"];
Expand Down

0 comments on commit ffe47d8

Please sign in to comment.