Skip to content

Commit

Permalink
fix search published repo bug (#5772)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael18811380328 authored Nov 15, 2023
1 parent a9c3a66 commit b6014e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/search/search-result-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SearchResultItem extends React.Component {
let folderIconUrl = item.link_content ? Utils.getFolderIconUrl(false, 192) : Utils.getDefaultLibIconUrl(true);
let fileIconUrl = item.is_dir ? folderIconUrl : Utils.getFileIconUrl(item.name, 192);

if (item.thumbnail_url !== '') {
if (item.thumbnail_url) {
fileIconUrl = item.thumbnail_url;
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class Search extends Component {
this.source = null;
if (res.data.total > 0) {
this.setState({
resultItems: [...this.state.resultItems, this.formatResultItems(res.data.results)],
resultItems: [...this.state.resultItems, ...this.formatResultItems(res.data.results)],
isResultGetted: true,
page: page + 1,
isLoading: false,
Expand Down

0 comments on commit b6014e1

Please sign in to comment.