Commit dd01474
Convert Stimulus controller methods to arrow functions for SWC compatibility
Use arrow functions (class fields) instead of regular methods in CommentsController to ensure proper `this` binding with SWC transpilation. Arrow functions maintain lexical `this` binding, which fixes the issue where Stimulus event listeners weren't triggering methods correctly when transpiled by SWC.
Changes:
- resetText() -> resetText = () => {}
- refreshCommentList() -> refreshCommentList = () => {}
- connect() -> connect = () => {}
This ensures Stimulus can properly bind and call these methods when responding to Turbo events.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent b6548d7 commit dd01474
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments