fix: restart clash should update something

This commit is contained in:
GyDi
2022-01-21 00:29:33 +08:00
parent 65fb2ca2d5
commit 4b5b62c8ae
3 changed files with 18 additions and 3 deletions

View File

@@ -7,8 +7,9 @@ let server = "";
let secret = "";
/// initialize some infomation
export async function getAxios() {
if (axiosIns) return axiosIns;
/// enable force update axiosIns
export async function getAxios(force: boolean = false) {
if (axiosIns && !force) return axiosIns;
try {
const info = await getClashInfo();