Skip to content

Commit

Permalink
fix: config trim 逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Sep 4, 2024
1 parent 132e235 commit 6599d26
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 202 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@
"wrangler": "wrangler"
},
"dependencies": {
"cloudflare-worker-adapter": "^1.3.2"
"cloudflare-worker-adapter": "^1.3.3"
},
"devDependencies": {
"@antfu/eslint-config": "^2.27.3",
"@antfu/eslint-config": "^3.0.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/node": "^22.5.1",
"@vercel/node": "^3.2.9",
"@types/node": "^22.5.3",
"@vercel/node": "^3.2.11",
"eslint": "^9.8.0",
"eslint-plugin-format": "^0.1.2",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-node-externals": "^7.1.3",
"telegram-bot-api-types": "^7.9.12",
"tsx": "^4.19.0",
"typescript": "^5.5.4",
"vite": "^5.4.2",
"vite": "^5.4.3",
"vite-plugin-checker": "^0.7.2",
"vite-plugin-dts": "^4.0.3",
"wrangler": "^3.72.3"
"vite-plugin-dts": "^4.1.0",
"wrangler": "^3.74.0"
}
}
2 changes: 1 addition & 1 deletion src/config/merger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ConfigMerger {

static trim(source: AgentUserConfig, lock: string[]): Record<string, any> {
const config: Record<string, any> = { ...source };
const keysSet = new Set<string>(source.DEFINE_KEYS || []);
const keysSet = new Set<string>(source?.DEFINE_KEYS || []);
for (const key of lock) {
keysSet.delete(key);
}
Expand Down
Loading

0 comments on commit 6599d26

Please sign in to comment.