Prevent duplicate host filter strings

This commit is contained in:
mabashian
2017-08-25 13:27:01 -04:00
parent e1ee95234e
commit 5be6d5bf26
4 changed files with 22 additions and 11 deletions

View File

@@ -236,7 +236,14 @@ export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', '
return sourceValue;
}
else {
return object[key] + "%20and%20" + sourceValue;
let singleSearchParamKeys = object[key].split("%20and%20");
if(_.includes(singleSearchParamKeys, sourceValue)) {
return object[key];
}
else {
return object[key] + "%20and%20" + sourceValue;
}
}
}
// Start the array of keys