Skip to content

Commit a361299

Browse files
obiotclaude
andcommitted
Fix no-confusing-void-expression lint errors in DOM event handlers
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9fb16ee commit a361299

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

packages/melonjs/src/application/application.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,15 @@ export default class Application {
318318
setDefaultGame(this);
319319

320320
// bridge DOM events to the melonJS event system
321-
this._onResize = (e: Event) => emit(WINDOW_ONRESIZE, e);
322-
this._onOrientationChange = (e: Event) =>
321+
this._onResize = (e: Event) => {
322+
emit(WINDOW_ONRESIZE, e);
323+
};
324+
this._onOrientationChange = (e: Event) => {
323325
emit(WINDOW_ONORIENTATION_CHANGE, e);
324-
this._onScroll = (e: Event) => emit(WINDOW_ONSCROLL, e);
326+
};
327+
this._onScroll = (e: Event) => {
328+
emit(WINDOW_ONSCROLL, e);
329+
};
325330
globalThis.addEventListener("resize", this._onResize);
326331
globalThis.addEventListener("orientationchange", this._onOrientationChange);
327332
if (device.screenOrientation) {

0 commit comments

Comments
 (0)