Commit ed4db24b by Calcium-Ion Committed by GitHub

Merge pull request #91 from QuentinHsu/fix-model-name-not-trimmed

fix: model name not trimmed
parents 87637851 8fa3a0a4
......@@ -241,7 +241,7 @@ const EditChannel = (props) => {
const addCustomModel = () => {
if (customModel.trim() === '') return;
if (inputs.models.includes(customModel)) return;
if (inputs.models.includes(customModel)) return showError("该模型已存在!");
let localModels = [...inputs.models];
localModels.push(customModel);
let localModelOptions = [];
......@@ -454,7 +454,7 @@ const EditChannel = (props) => {
placeholder='输入自定义模型名称'
value={customModel}
onChange={(value) => {
setCustomModel(value);
setCustomModel(value.trim());
}}
/>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment