diff --git a/src/components/setting/mods/tun-viewer.tsx b/src/components/setting/mods/tun-viewer.tsx index 8f0e5c59c..9474c2b21 100644 --- a/src/components/setting/mods/tun-viewer.tsx +++ b/src/components/setting/mods/tun-viewer.tsx @@ -89,13 +89,11 @@ export function TunViewer({ ref }: { ref?: Ref }) { }), false, ); - try { - await enhanceProfiles(); - showNotice.success("settings.modals.tun.messages.applied"); - } catch (err: any) { - showNotice.error(err); - } setOpen(false); + showNotice.success("settings.modals.tun.messages.applied"); + void enhanceProfiles().catch((err: any) => { + showNotice.error(err); + }); } catch (err: any) { showNotice.error(err); }