When source is undefined, source?.file evaluates to undefined \!== null,
incorrectly making hasSourceFile true. This could cause library code
filtering to trigger when no source is set.
Changed the check to use Boolean(this.source?.file) which correctly
handles undefined, null, and falsy values.
Added tests to verify the fix handles both undefined and null sources.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>