Timothy Jaeryang Baek пре 3 месеци
родитељ
комит
266899acc0
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/lib/components/chat/Suggestions.svelte

+ 2 - 2
src/lib/components/chat/Suggestions.svelte

@@ -53,10 +53,10 @@
 		}
 		}
 	};
 	};
 
 
-	onMount(() => {
+	$: if (suggestionPrompts) {
 		sortedPrompts = [...(suggestionPrompts ?? [])].sort(() => Math.random() - 0.5);
 		sortedPrompts = [...(suggestionPrompts ?? [])].sort(() => Math.random() - 0.5);
 		getFilteredPrompts(inputValue);
 		getFilteredPrompts(inputValue);
-	});
+	}
 </script>
 </script>
 
 
 <div class="mb-1 flex gap-1 text-xs font-medium items-center text-gray-400 dark:text-gray-600">
 <div class="mb-1 flex gap-1 text-xs font-medium items-center text-gray-400 dark:text-gray-600">