From cb140e482f522b5add2f31b42d80eda471764335 Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Fri, 10 Nov 2023 15:15:43 +0800 Subject: [PATCH] fix: #3207 ensure corner case --- README_CN.md | 2 +- app/utils/clone.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README_CN.md b/README_CN.md index c82dfc044e7..72376374f86 100644 --- a/README_CN.md +++ b/README_CN.md @@ -138,7 +138,7 @@ Azure Api 版本,你可以在这里找到:[Azure 文档](https://learn.micro OPENAI_API_KEY= # 中国大陆用户,可以使用本项目自带的代理进行开发,你也可以自由选择其他代理地址 -BASE_URL=https://nb.nextweb.fun/api/proxy +BASE_URL=https://ab.nextweb.fun/api/proxy ``` ### 本地开发 diff --git a/app/utils/clone.ts b/app/utils/clone.ts index c42288f7789..e4cd291111d 100644 --- a/app/utils/clone.ts +++ b/app/utils/clone.ts @@ -6,5 +6,7 @@ export function ensure( 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] !== "", + ); }