refactor(claude-code-mcp-loader): simplify env expansion null guard
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -35,7 +35,7 @@ export function expandEnvVars(value: string, options: ExpandEnvVarsOptions = {})
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function expandEnvVarsInObject<T>(obj: T, options: ExpandEnvVarsOptions = {}): T {
|
export function expandEnvVarsInObject<T>(obj: T, options: ExpandEnvVarsOptions = {}): T {
|
||||||
if (obj === null || obj === undefined) return obj
|
if (obj == null) return obj
|
||||||
if (typeof obj === "string") return expandEnvVars(obj, options) as T
|
if (typeof obj === "string") return expandEnvVars(obj, options) as T
|
||||||
if (Array.isArray(obj)) {
|
if (Array.isArray(obj)) {
|
||||||
return obj.map((item) => expandEnvVarsInObject(item, options)) as T
|
return obj.map((item) => expandEnvVarsInObject(item, options)) as T
|
||||||
|
|||||||
Reference in New Issue
Block a user