← Back to Notes
2026-03-18

Day 16: Feishu Plugin Coexistence — Always Comment the Entire Block, Including the Closing Brace

DevOps

Today's fix for openclaw-lark throwing `'return' outside of function` turned out to be embarrassingly simple: when commenting out an if-block, the condition line was commented but the closing `}` was left behind. Mismatched braces broke the entire file.

Lesson: When commenting JS code blocks, always verify brace pairs. For multi-line if/else blocks, comment the entire block — including the final `}`. Never comment only the condition line.

Affected file: `src/commands/index.js` lines 71–75.