diff options
| author | Haishan <[email protected]> | 2021-02-28 11:51:29 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2021-02-28 18:04:18 +0800 |
| commit | 7ceca5be11bbf1c8dd25e08a00390f296eb2c140 (patch) | |
| tree | 9341c834a223da2fc0fef2049299ccf7ac7285c0 /src/store | |
| parent | 3e50b5ba5b0c3eb2ba9b5684ecde7365fd2b5454 (diff) | |
build: upgrade deps
Diffstat (limited to 'src/store')
| -rw-r--r-- | src/store/app.ts | 9 |
1 files changed, 4 insertions, 5 deletions
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, }; |
