From 79a475d60ffbce67b9063326258c9c1274eadb56 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 11 Apr 2026 23:36:14 +0900 Subject: [PATCH] refactor(background-agent): simplify loop detector null guard Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/features/background-agent/loop-detector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/background-agent/loop-detector.ts b/src/features/background-agent/loop-detector.ts index afcbe4abb..ecfcf23f3 100644 --- a/src/features/background-agent/loop-detector.ts +++ b/src/features/background-agent/loop-detector.ts @@ -62,7 +62,7 @@ export function recordToolCall( } function sortObject(obj: unknown): unknown { - if (obj === null || obj === undefined) return obj + if (obj == null) return obj if (typeof obj !== "object") return obj if (Array.isArray(obj)) return obj.map(sortObject)