Skip to content

Commit 7caea46

Browse files
committed
fix(organize): 新增文件的两条 biome 告警——可选链与未用绑定(#231)
1 parent a68c1cd commit 7caea46

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎dsh-mneme/lib/organize.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export function createOrganizer({ store, embedQuery, saveWithDedupe, transaction
254254
throw new Error("organize.apply: run_id is required (apply must reference a dryRun report)");
255255
}
256256
const report = store.getDreamRun(dryRunId);
257-
if (!report || report.run_type !== "organize") {
257+
if (report?.run_type !== "organize") {
258258
throw new Error(`organize.apply: unknown organize run "${dryRunId}"`);
259259
}
260260
// apply 回执与 dryRun 报告共用 run_type='organize':只有 outcome.dry_run_id 能

‎dsh-mneme/src/organize.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export function createOrganizer({ store, embedQuery, saveWithDedupe, transaction
254254
throw new Error("organize.apply: run_id is required (apply must reference a dryRun report)");
255255
}
256256
const report = store.getDreamRun(dryRunId);
257-
if (!report || report.run_type !== "organize") {
257+
if (report?.run_type !== "organize") {
258258
throw new Error(`organize.apply: unknown organize run "${dryRunId}"`);
259259
}
260260
// apply 回执与 dryRun 报告共用 run_type='organize':只有 outcome.dry_run_id 能

‎dsh-mneme/test/organize.test.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ test("#231: apply refuses an apply receipt as its dryRun reference", async () =>
320320
});
321321

322322
test("#231: a throwing embedder fails the dryRun, audits it and rethrows", async () => {
323-
const { store, service, organize } = makeOrganizer(async () => {
323+
const { store, service } = makeOrganizer(async () => {
324324
throw new Error("embedder offline");
325325
});
326326
const seeded = service.saveWithDedupe({ type: "preference", title: "已有向量", content: "内容" }).memory;

0 commit comments

Comments
 (0)