fix(spotlight): remove all non-null assertions to pass oxlint
- Refactor groupDispatchers to accept userId as a parameter instead of closing over nullable userId - Replace mutationGroup! with a guard clause - Use optional chaining for preferenceChildrenOptionsByKey lookup with fallback
This commit is contained in:
2 files changed
+13
-11
No files matched your search
@@ -65,7 +65,8 @@ export const preferencesGroup = createGroup<PreferencesGroupOption>({
|
||||
useInteraction: (option) => ({
|
||||
type: "children",
|
||||
...(option.preferenceKey
|
||||
? preferenceChildrenOptionsByKey[option.preferenceKey as keyof typeof preferenceChildrenOptionsByKey]!({})
|
||||
? (preferenceChildrenOptionsByKey[option.preferenceKey as keyof typeof preferenceChildrenOptionsByKey]?.({}) ??
|
||||
settingsChildrenOptions({}))
|
||||
: settingsChildrenOptions({})),
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user