1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 19:08:21 +00:00

fix search published repo bug (#5772)

This commit is contained in:
Michael An
2023-11-15 17:46:00 +08:00
committed by GitHub
parent a9c3a6638c
commit b6014e1254
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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,