diff --git a/public/react/src/modules/user/usersInfo/InfosTopics.js b/public/react/src/modules/user/usersInfo/InfosTopics.js index 2b0964e21..565f42a3d 100644 --- a/public/react/src/modules/user/usersInfo/InfosTopics.js +++ b/public/react/src/modules/user/usersInfo/InfosTopics.js @@ -86,29 +86,34 @@ class InfosTopics extends Component{ if(user_id===undefined){ user_id=this.props.match.params&&this.props.match.params.username; } - let {per_page}=this.state; - let url=`/users/${user_id}/question_banks.json`; - - axios.get(encodeURI(url),{params:{ - type, - object_type:category, - course_list_id, - sort_by, - sort_direction, - page, - per_page - } - }).then((response) => { - this.setState({ - data:response.data, - checkBoxValues:[], - isSpin:false - }) - }).catch((error) => { - this.setState({ - isSpin:false - }) - }); + + + if(user_id!=undefined){ + let {per_page}=this.state; + let url=`/users/${user_id}/question_banks.json`; + + axios.get(encodeURI(url),{params:{ + type, + object_type:category, + course_list_id, + sort_by, + sort_direction, + page, + per_page + } + }).then((response) => { + this.setState({ + data:response.data, + checkBoxValues:[], + isSpin:false + }) + }).catch((error) => { + this.setState({ + isSpin:false + }) + }); + } + }