mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-09 20:28:29 +03:00
fix: fetch suggestions
This commit is contained in:
parent
1adad7d273
commit
dab8685e9d
@ -299,8 +299,13 @@ class CarouselSidebarData extends React.Component {
|
||||
};
|
||||
|
||||
updateSuggestions = () => {
|
||||
let newSuggestions = new Set([...this.props.viewer.tags, ...this.state.tags]);
|
||||
this.setState({ suggestions: Array.from(newSuggestions) });
|
||||
if (Array.isArray(this.props.viewer.tags)) {
|
||||
let newSuggestions = new Set([...this.props.viewer.tags, ...this.state.tags]);
|
||||
this.setState({ suggestions: Array.from(newSuggestions) });
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({ suggestions: this.state.tag });
|
||||
};
|
||||
|
||||
_handleDarkMode = async (e) => {
|
||||
|
@ -231,8 +231,13 @@ export default class CarouselSidebarSlate extends React.Component {
|
||||
};
|
||||
|
||||
updateSuggestions = () => {
|
||||
let newSuggestions = new Set([...this.props.viewer.tags, ...this.state.tags]);
|
||||
this.setState({ suggestions: Array.from(newSuggestions) });
|
||||
if (Array.isArray(this.props.viewer.tags)) {
|
||||
let newSuggestions = new Set([...this.props.viewer.tags, ...this.state.tags]);
|
||||
this.setState({ suggestions: Array.from(newSuggestions) });
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState({ suggestions: this.state.tag });
|
||||
};
|
||||
|
||||
_handleClose = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user