perf: prompt when the name of the custom model input already exists
This commit is contained in:
1 parent
6543905bfd
commit
8fa3a0a4e0
1 file changed
+1
-1
@@ -241,7 +241,7 @@ const EditChannel = (props) => {
|
|||||||
|
|
||||||
const addCustomModel = () => {
|
const addCustomModel = () => {
|
||||||
if (customModel.trim() === '') return;
|
if (customModel.trim() === '') return;
|
||||||
if (inputs.models.includes(customModel)) return;
|
if (inputs.models.includes(customModel)) return showError("该模型已存在!");
|
||||||
let localModels = [...inputs.models];
|
let localModels = [...inputs.models];
|
||||||
localModels.push(customModel);
|
localModels.push(customModel);
|
||||||
let localModelOptions = [];
|
let localModelOptions = [];
|
||||||
|
|||||||
Reference in new issue
Block a user