make trustedDomains persist across reloads

we can't just write to `prefer.s.*`, we need to `.commit`

also, there's no need to use the reactive view (`prefer.r.*`) in
non-reactive contexts
This commit is contained in:
dakkar 2025-07-23 10:46:01 +01:00
parent ed68230811
commit df0f682518
2 changed files with 3 additions and 3 deletions

View file

@ -64,7 +64,7 @@ function done(canceled: boolean, result?: Result): void { // eslint-disable-line
async function ok() {
const result = true;
if (!prefer.s.trustedDomains.includes(domain.value) && trustThisDomain.value) {
prefer.r.trustedDomains.value = prefer.s.trustedDomains.concat(domain.value);
prefer.commit('trustedDomains', prefer.s.trustedDomains.concat(domain.value));
}
done(false, result);
}