We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee8bf56 commit ade239bCopy full SHA for ade239b
1 file changed
apps/roam/src/components/settings/utils/accessors.ts
@@ -724,6 +724,8 @@ export const getGlobalSettings = (): GlobalSettings => {
724
export const getGlobalSetting = <T = unknown>(
725
keys: string[],
726
): T | undefined => {
727
+ if (keys.length === 0) return undefined;
728
+
729
if (!isNewSettingsStoreEnabled()) {
730
return getLegacyGlobalSetting(keys) as T | undefined;
731
}
@@ -788,6 +790,8 @@ export const getPersonalSettings = (): PersonalSettings => {
788
790
export const getPersonalSetting = <T = unknown>(
789
791
792
793
794
795
796
return getLegacyPersonalSetting(keys) as T | undefined;
797
0 commit comments