Enable ts-strict for settingStore (#1322)

This commit is contained in:
Chenlei Hu
2024-10-26 17:07:17 -04:00
committed by GitHub
parent dc3dab4e1c
commit 92ac403679

View File

@@ -1,4 +1,3 @@
// @ts-strict-ignore
/**
* TODO: Migrate scripts/ui/settings.ts here
*
@@ -42,9 +41,9 @@ export const useSettingStore = defineStore('setting', {
(setting: SettingParams) => setting.category || setting.id.split('.')
)
const floatingSettings = root.children.filter((node) => node.leaf)
const floatingSettings = (root.children ?? []).filter((node) => node.leaf)
if (floatingSettings.length) {
root.children = root.children.filter((node) => !node.leaf)
root.children = (root.children ?? []).filter((node) => !node.leaf)
root.children.push({
key: 'Other',
label: 'Other',