mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-19 16:45:41 +08:00
fix: patch item option
This commit is contained in:
1 parent
d4b5c55169
commit
8fb9ad3fe7
2 files changed
+2
-2
No files matched your search
@@ -41,7 +41,7 @@ const ProfileEdit = (props: Props) => {
|
||||
try {
|
||||
const { uid } = itemData;
|
||||
const { name, desc, url } = form;
|
||||
const option_ = showOpt ? option : undefined;
|
||||
const option_ = itemData.type === "remote" ? option : undefined;
|
||||
|
||||
if (itemData.type === "remote" && !url) {
|
||||
throw new Error("Remote URL should not be null");
|
||||
|
||||
@@ -54,7 +54,7 @@ const ProfileNew = (props: Props) => {
|
||||
throw new Error("The URL should not be null");
|
||||
}
|
||||
|
||||
const option_ = showOpt ? option : undefined;
|
||||
const option_ = form.type === "remote" ? option : undefined;
|
||||
await createProfile({ ...form, name, option: option_ });
|
||||
setForm({ type: "remote", name: "", desc: "", url: "" });
|
||||
setOption({ user_agent: "" });
|
||||
|
||||
Reference in new issue
Block a user