fix: ESLint errors in _sanitizeCacheControl — strict equality and curly braces

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
bensonz
2026-02-21 12:11:07 +08:00
parent bbacdeb488
commit 9256d02e89

View File

@@ -525,7 +525,9 @@ class BedrockRelayService {
// Bedrock only supports { type: "ephemeral" } — extra fields like "scope"
// (added in Claude Code v2.1.38+) cause ValidationException.
_sanitizeCacheControl(obj) {
if (obj == null || typeof obj !== 'object') return obj
if (obj === null || obj === undefined || typeof obj !== 'object') {
return obj
}
if (Array.isArray(obj)) {
obj.forEach((item) => this._sanitizeCacheControl(item))