From 7ceca5be11bbf1c8dd25e08a00390f296eb2c140 Mon Sep 17 00:00:00 2001 From: Haishan Date: Sun, 28 Feb 2021 11:51:29 +0800 Subject: build: upgrade deps --- src/store/app.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/store/app.ts b/src/store/app.ts index d1daeeb..ccdae1a 100644 --- a/src/store/app.ts +++ b/src/store/app.ts @@ -52,10 +52,7 @@ export function removeClashAPIConfig({ baseURL, secret }) { return async (dispatch: DispatchFn, getState: GetStateFn) => { const idx = findClashAPIConfigIndex(getState, { baseURL, secret }); dispatch('removeClashAPIConfig', (s) => { - s.app.clashAPIConfigs = [ - ...s.app.clashAPIConfigs.slice(0, idx), - ...s.app.clashAPIConfigs.slice(idx + 1), - ]; + s.app.clashAPIConfigs.splice(idx, 1); }); // side effect saveState(getState().app); @@ -160,7 +157,9 @@ export function updateCollapsibleIsOpen( } const defaultClashAPIConfig = { - baseURL: document.getElementById('app')?.getAttribute('data-base-url') ?? 'http://127.0.0.1:9090', + baseURL: + document.getElementById('app')?.getAttribute('data-base-url') ?? + 'http://127.0.0.1:9090', secret: '', addedAt: 0, }; -- cgit v1.3.1