Skip to content
Snippets Groups Projects
Unverified Commit 8890051c authored by GyDi's avatar GyDi
Browse files

fix: patch item option

parent cf00c947
No related branches found
No related tags found
No related merge requests found
......@@ -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: "" });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment