Skip to content

Commit bda80f0

Browse files
committed
Use concat to avoid creating too many arguments for big updates.
1 parent cbaab3d commit bda80f0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/sdk/src/db_connection_impl.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,14 +525,15 @@ export class DbConnectionImpl<
525525
tableUpdates: TableUpdate[],
526526
eventContext: EventContextInterface
527527
): PendingCallback[] {
528-
const pendingCallbacks: PendingCallback[] = [];
528+
let pendingCallbacks: PendingCallback[] = [];
529529
for (let tableUpdate of tableUpdates) {
530530
// Get table information for the table being updated
531531
const tableName = tableUpdate.tableName;
532532
const tableTypeInfo = this.#remoteModule.tables[tableName]!;
533533
const table = this.clientCache.getOrCreateTable(tableTypeInfo);
534-
pendingCallbacks.push(
535-
...table.applyOperations(tableUpdate.operations, eventContext)
534+
535+
pendingCallbacks = pendingCallbacks.concat(
536+
table.applyOperations(tableUpdate.operations, eventContext)
536537
);
537538
}
538539
return pendingCallbacks;

0 commit comments

Comments
 (0)