refactor: remove unnecessary object spread in conditionalGeneration.js#1999
Conversation
|
What reviewer looks at during PR reviewThe following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.
|
📝 WalkthroughWalkthroughisGenerationConditionMet now forwards Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ditionalGeneration.js
|
@Adi-204 sure i will revert the formatting changes |
|
@Adi-204 i have removed the unnecessary formatting. You can review this again |
|
|
/rtm |



Description
I noticed a small code smell in
apps/generator/lib/conditionalGeneration.js.There was an object literal being spread inside another object literal unnecessarily.
This PR refactors the code to define the property directly, improving readability and removing a redundant operation.
Changes
conditionalGeneration.js.templateParamstoconditionalSubjectGeneration(was causing a crash).Related Issue
Resolves issue #1911
Verification
I manually verified the changes using a mocked script because the test suite was skipping this code path.
The logic now correctly handles conditional generation without crashing.
Checklist
Summary by CodeRabbit