Skip to content

Commit

Permalink
Fixed events when slicing immutable Result (#3765).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 13, 2023
1 parent 37bf4fb commit 2ba4a17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src.ts/contract/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ async function _emit(contract: BaseContract, event: ContractEventName, args: Arr

const count = sub.listeners.length;
sub.listeners = sub.listeners.filter(({ listener, once }) => {
const passArgs = args.slice();
const passArgs = Array.from(args);
if (payloadFunc) {
passArgs.push(payloadFunc(once ? null: listener));
}
Expand Down

0 comments on commit 2ba4a17

Please sign in to comment.