fix(memory): avoid optional vector status dereference · openclaw/openclaw@36c1a3e
vincentkoc
·
2026-06-02
·
via Recent Commits to openclaw:main
File tree
extensions/memory-core/src/memory
| Original file line number | Diff line number | Diff line change |
|---|
@@ -165,9 +165,10 @@ describe("memory manager FTS-only reindex", () => {
|
165 | 165 | |
166 | 166 | await memoryManager.sync({ force: true }); |
167 | 167 | |
| 168 | +const status = memoryManager.status(); |
168 | 169 | expect(createEmbeddingProviderMock).not.toHaveBeenCalled(); |
169 | | -expect(memoryManager.status().vector.enabled).toBe(false); |
170 | | -expect(memoryManager.status().custom?.indexIdentity).toEqual({ status: "valid" }); |
| 170 | +expect(status.vector).toMatchObject({ enabled: false }); |
| 171 | +expect(status.custom?.indexIdentity).toEqual({ status: "valid" }); |
171 | 172 | expect(countChunksContaining("Alpha topic")).toBeGreaterThan(0); |
172 | 173 | }); |
173 | 174 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。