瀏覽代碼

fix: web search config

Timothy Jaeryang Baek 2 月之前
父節點
當前提交
338a34563a
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      src/lib/components/admin/Settings/WebSearch.svelte

+ 7 - 7
src/lib/components/admin/Settings/WebSearch.svelte

@@ -35,12 +35,10 @@
 
 	const submitHandler = async () => {
 		// Convert domain filter string to array before sending
-		if (webConfig?.search?.domain_filter_list) {
-			webConfig.search.domain_filter_list = webConfig.search.domain_filter_list
-				.split(',')
-				.map(domain => domain.trim())
-				.filter(domain => domain.length > 0);
-		}
+		webConfig.search.domain_filter_list = webConfig.search.domain_filter_list
+			.split(',')
+			.map((domain) => domain.trim())
+			.filter((domain) => domain.length > 0);
 
 		const res = await updateRAGConfig(localStorage.token, {
 			web: webConfig,
@@ -354,7 +352,9 @@
 
 						<input
 							class="w-full rounded-lg py-2 px-4 text-sm bg-gray-50 dark:text-gray-300 dark:bg-gray-850 outline-none"
-							placeholder={$i18n.t('Enter domains separated by commas (e.g., example.com,site.org)')}
+							placeholder={$i18n.t(
+								'Enter domains separated by commas (e.g., example.com,site.org)'
+							)}
 							bind:value={webConfig.search.domain_filter_list}
 						/>
 					</div>