<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Adjusted the placement of a conditional check to improve code organization. No changes to user-facing functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->