FIX: stop stripping "undefined" from fullpage search
This commit is contained in:
parent
281e430a89
commit
cb14da4d90
|
@ -104,11 +104,13 @@ export default Ember.Controller.extend({
|
|||
cleanTerm(term) {
|
||||
if (term) {
|
||||
SortOrders.forEach(order => {
|
||||
let matches = term.match(new RegExp(`${order.term}\\b`));
|
||||
if (matches) {
|
||||
this.set('sortOrder', order.id);
|
||||
term = term.replace(new RegExp(`${order.term}\\b`, 'g'), "");
|
||||
term = term.trim();
|
||||
if (order.term) {
|
||||
let matches = term.match(new RegExp(`${order.term}\\b`));
|
||||
if (matches) {
|
||||
this.set('sortOrder', order.id);
|
||||
term = term.replace(new RegExp(`${order.term}\\b`, 'g'), "");
|
||||
term = term.trim();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue