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:
@@ -26,7 +26,7 @@ class SearchResultItem extends React.Component {
|
|||||||
let folderIconUrl = item.link_content ? Utils.getFolderIconUrl(false, 192) : Utils.getDefaultLibIconUrl(true);
|
let folderIconUrl = item.link_content ? Utils.getFolderIconUrl(false, 192) : Utils.getDefaultLibIconUrl(true);
|
||||||
let fileIconUrl = item.is_dir ? folderIconUrl : Utils.getFileIconUrl(item.name, 192);
|
let fileIconUrl = item.is_dir ? folderIconUrl : Utils.getFileIconUrl(item.name, 192);
|
||||||
|
|
||||||
if (item.thumbnail_url !== '') {
|
if (item.thumbnail_url) {
|
||||||
fileIconUrl = item.thumbnail_url;
|
fileIconUrl = item.thumbnail_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -249,7 +249,7 @@ class Search extends Component {
|
|||||||
this.source = null;
|
this.source = null;
|
||||||
if (res.data.total > 0) {
|
if (res.data.total > 0) {
|
||||||
this.setState({
|
this.setState({
|
||||||
resultItems: [...this.state.resultItems, this.formatResultItems(res.data.results)],
|
resultItems: [...this.state.resultItems, ...this.formatResultItems(res.data.results)],
|
||||||
isResultGetted: true,
|
isResultGetted: true,
|
||||||
page: page + 1,
|
page: page + 1,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
Reference in New Issue
Block a user