File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 4242 }
4343
4444 const getFilteredPrompts = (inputValue ) => {
45- const newFilteredPrompts = inputValue .trim ()
46- ? fuse .search (inputValue .trim ()).map ((result ) => result .item )
47- : sortedPrompts ;
48-
49- // Compare with the oldFilteredPrompts
50- // If there's a difference, update array + version
51- if (! arraysEqual (filteredPrompts , newFilteredPrompts )) {
52- filteredPrompts = newFilteredPrompts ;
45+ if (inputValue .length > 500 ) {
46+ filteredPrompts = [];
47+ } else {
48+ const newFilteredPrompts = inputValue .trim ()
49+ ? fuse .search (inputValue .trim ()).map ((result ) => result .item )
50+ : sortedPrompts ;
51+
52+ // Compare with the oldFilteredPrompts
53+ // If there's a difference, update array + version
54+ if (! arraysEqual (filteredPrompts , newFilteredPrompts )) {
55+ filteredPrompts = newFilteredPrompts ;
56+ }
5357 }
5458 };
5559
You can’t perform that action at this time.
0 commit comments