Merge branch 'master' into mx

This commit is contained in:
Letícia Camara 2018-10-13 02:19:53 -03:00
commit 80d200f5c8
3 changed files with 5 additions and 1 deletions

View file

@ -144,6 +144,7 @@ class EnhancedTable extends Component {
// If query is empty or undefined
if (!query) {
this.setState({searchQuery: ''});
this.props.onSearchChange(this.props.data);
return;
}
// Update the search field as soon as the character is typed

View file

@ -124,7 +124,8 @@ class AmbassadorsPage extends Component {
query: {
$sort: { account: 1 },
$limit: limit,
$skip: skip
$skip: skip,
disabled: false
}
});
total = partialResponse.total;

View file

@ -7,10 +7,12 @@ function addProtocol(url, protocol) {
}
function stripProtocol(url){
if(!url) return '';
return url.replace(/(^\w+:|^)\/\//, '');
}
function getProtocol(url){
if(!url) return '';
const values = url.match(/(^\w+:|^)\/\//);
return values && (values.length > 0) ? values[0] : '';