Skip to content

Commit 459a4f8

Browse files
committed
Skip prefixing if key already has the prefix to avoid double-prefixing
1 parent ac08e00 commit 459a4f8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/hooks/useGenericSettings.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,9 @@ const useGenericSettings = <T extends SettingsGroupName>(
535535
if (groupName === 'content_filter' && key === 'full_text_kinds') {
536536
prefixedSettings[key] = value;
537537
} else {
538-
prefixedSettings[`${prefix}${key}`] = value;
538+
// Skip prefixing if key already has the prefix to avoid double-prefixing
539+
const prefixedKey = key.startsWith(prefix) ? key : `${prefix}${key}`;
540+
prefixedSettings[prefixedKey] = value;
539541
}
540542
});
541543

0 commit comments

Comments
 (0)