fix(plugins/settings.plugins): don't restore default repo multiple times
This commit is contained in:
parent
49c1b1e68d
commit
0c9cd9f8e3
1 changed files with 3 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import {
|
|||
setRepos,
|
||||
} from '@revenge-mod/plugins/_/repositories'
|
||||
import { noop } from '@revenge-mod/utils/callback'
|
||||
import { api } from '.'
|
||||
import type { Repo, RepoConfigEntry } from '@revenge-mod/plugins/_/repositories'
|
||||
|
||||
export async function addDefaultRepoIfNeeded() {
|
||||
|
|
@ -21,6 +22,8 @@ export async function addDefaultRepoIfNeeded() {
|
|||
...userRepos,
|
||||
])
|
||||
|
||||
await api.jsonStorage.set({ defaultRepoRestored: true }).catch(noop)
|
||||
|
||||
await refreshRepo(__BUILD_DEFAULT_PLUGIN_REPOSITORY_URL__).catch(noop)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue