mirror of
https://github.com/ansible/awx.git
synced 2026-03-04 02:01:01 -03:30
small change based on PR feedback
This commit is contained in:
@@ -23,11 +23,11 @@ export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', '
|
|||||||
|
|
||||||
// Removes state definition defaults and pagination terms
|
// Removes state definition defaults and pagination terms
|
||||||
function stripDefaultParams(params) {
|
function stripDefaultParams(params) {
|
||||||
let strippedCopy, stripped =_.pick(params, (value, key) => {
|
let stripped =_.pick(params, (value, key) => {
|
||||||
// setting the default value of a term to null in a state definition is a very explicit way to ensure it will NEVER generate a search tag, even with a non-default value
|
// setting the default value of a term to null in a state definition is a very explicit way to ensure it will NEVER generate a search tag, even with a non-default value
|
||||||
return defaults[key] !== value && key !== 'order_by' && key !== 'page' && key !== 'page_size' && defaults[key] !== null;
|
return defaults[key] !== value && key !== 'order_by' && key !== 'page' && key !== 'page_size' && defaults[key] !== null;
|
||||||
});
|
});
|
||||||
strippedCopy = _.cloneDeep(stripped);
|
let strippedCopy = _.cloneDeep(stripped);
|
||||||
if(_.keys(_.pick(defaults, _.keys(strippedCopy))).length > 0){
|
if(_.keys(_.pick(defaults, _.keys(strippedCopy))).length > 0){
|
||||||
for (var key in strippedCopy) {
|
for (var key in strippedCopy) {
|
||||||
if (strippedCopy.hasOwnProperty(key)) {
|
if (strippedCopy.hasOwnProperty(key)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user