fix: 修复重命名对话时未指定对话ID或标题的警告逻辑
- 将解构赋值改为使用 let 关键字,确保变量可变性。 - 增强了对输入数据的验证,避免潜在的错误。
This commit is contained in:
parent
942a8e6b17
commit
6ecfbe523b
@ -301,7 +301,7 @@ const deleteChat = async (chatId) => {
|
|||||||
|
|
||||||
// 重命名对话
|
// 重命名对话
|
||||||
const renameChat = async (data) => {
|
const renameChat = async (data) => {
|
||||||
const { chatId, title } = data;
|
let { chatId, title } = data;
|
||||||
|
|
||||||
if (!chatId || !title) {
|
if (!chatId || !title) {
|
||||||
console.warn("未指定对话ID或标题,无法重命名对话");
|
console.warn("未指定对话ID或标题,无法重命名对话");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user