test: update recurrence expansion test + fix TS/Lint errors
This commit is contained in:
@@ -2,6 +2,7 @@ import { create } from 'zustand';
|
||||
import { persist } from 'zustand/middleware';
|
||||
import { useThemeStore } from './theme-store';
|
||||
import { useLocaleStore } from './locale-store';
|
||||
import { usePolicyStore } from './policy-store';
|
||||
import type { NotificationSoundChoice } from '@/lib/notification-sound';
|
||||
import { apiFetch } from '@/lib/browser-navigation';
|
||||
import {
|
||||
@@ -645,11 +646,8 @@ export const useSettingsStore = create<SettingsState>()(
|
||||
|
||||
updateSetting: (key, value, opts?: { force?: boolean }) => {
|
||||
if (!opts?.force) {
|
||||
try {
|
||||
const { usePolicyStore } = require('./policy-store');
|
||||
const locked = usePolicyStore.getState().isSettingLocked(key);
|
||||
if (locked) return;
|
||||
} catch { /* policy store may not be loaded yet */ }
|
||||
const locked = usePolicyStore.getState().isSettingLocked(key);
|
||||
if (locked) return;
|
||||
}
|
||||
set({ [key]: value });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user