Skip to content

Commit

Permalink
fix: global trigger args not being passed
Browse files Browse the repository at this point in the history
  • Loading branch information
lajbel committed Jan 20, 2025
1 parent cc5260f commit fc4b11c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
);
```

### Fixed

- Fixed a bug where args were not being passed to global `trigger()` - @lajbel

## [3001.0.9] - 2025-01-15

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/events/globalEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function on<Ev extends GameObjEventNames>(
export const trigger = (event: string, tag: string, ...args: any[]) => {
for (const obj of _k.game.root.children) {
if (obj.is(tag)) {
obj.trigger(event);
obj.trigger(event, args);
}
}
};
Expand Down

0 comments on commit fc4b11c

Please sign in to comment.