Commit dc2b035
Fix rsc_support_enabled? to return explicit boolean values
Fix the rsc_support_enabled? method to return true/false instead of nil
when enable_rsc_support is false or nil.
Issue: The expression `respond_to?(:enable_rsc_support) && enable_rsc_support`
returns nil when enable_rsc_support is falsy, not an explicit false.
Solution: Use double bang (!!) to coerce the result to a boolean:
`respond_to?(:enable_rsc_support) && !!enable_rsc_support`
This fixes 3 failing tests:
- ReactOnRailsPro::Utils.rsc_support_enabled? when RSC support is enabled
- ReactOnRailsPro::Utils.rsc_support_enabled? when RSC support is disabled
- ReactOnRailsPro::Utils cache helpers .bundle_hash and .bundle_file_name
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 4c02413 commit dc2b035
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments