Skip to content

Commit

Permalink
fix: #3207 ensure corner case
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa committed Nov 10, 2023
1 parent e6b72ac commit cb140e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Azure Api 版本,你可以在这里找到:[Azure 文档](https://learn.micro
OPENAI_API_KEY=<your api key here>
# 中国大陆用户,可以使用本项目自带的代理进行开发,你也可以自由选择其他代理地址
BASE_URL=https://nb.nextweb.fun/api/proxy
BASE_URL=https://ab.nextweb.fun/api/proxy
```

### 本地开发
Expand Down
4 changes: 3 additions & 1 deletion app/utils/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ export function ensure<T extends object>(
obj: T,
keys: Array<[keyof T][number]>,
) {
return keys.every((k) => obj[k] !== undefined && obj[k] !== null);
return keys.every(
(k) => obj[k] !== undefined && obj[k] !== null && obj[k] !== "",
);
}

0 comments on commit cb140e4

Please sign in to comment.