mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 18:30:15 +01:00
style(tokenizer.js): comment out console.log statement
fix(Settings.jsx): handle null or empty context in useEffect to avoid errors
This commit is contained in:
parent
1a196580b2
commit
6e233accf5
2 changed files with 3 additions and 5 deletions
|
|
@ -28,14 +28,12 @@ function Settings(props) {
|
|||
// useEffect to update token count
|
||||
|
||||
useEffect(() => {
|
||||
if (!context) return;
|
||||
|
||||
if (context.trim() === '') {
|
||||
if (!context || context.trim() === '') {
|
||||
setTokenCount(0);
|
||||
return;
|
||||
}
|
||||
|
||||
const debouncedPost = debounce(axiosPost, 500);
|
||||
const debouncedPost = debounce(axiosPost, 250);
|
||||
const handleTextChange = context => {
|
||||
debouncedPost({
|
||||
url: '/api/tokenizer',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue