Skip to content

Commit

Permalink
BUG: Searching in UI results in white screen (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bojun-Feng authored Sep 7, 2023
1 parent 4ffc1b7 commit 5b2f758
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions xinference/web/ui/src/scenes/launch_model/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ const LaunchModel = () => {
};

const filter = (registration) => {
if (!registration || typeof searchTerm !== "string") return false;
const modelName = registration.model_name
? registration.model_name.toLowerCase()
: "";
const modelDescription = registration.model_description
? registration.model_description.toLowerCase()
: "";

if (
!registration.model_name
.toLowerCase()
.includes(searchTerm.toLowerCase()) &&
!registration.model_description
.toLowerCase()
.includes(searchTerm.toLowerCase())
!modelName.includes(searchTerm.toLowerCase()) &&
!modelDescription.includes(searchTerm.toLowerCase())
) {
return false;
}
Expand Down

0 comments on commit 5b2f758

Please sign in to comment.