Merge pull request #4982 from mabashian/4860-delete-tags

Smart search tag deletion (again)
This commit is contained in:
Michael Abashian 2017-01-27 10:01:20 -05:00 committed by GitHub
commit 99cd9d9d4b

View File

@ -212,7 +212,15 @@ export default ['$stateParams', '$scope', '$state', 'QuerySet', 'GetBasePath', '
params.page = '1';
queryset = _.merge(queryset, params, (objectValue, sourceValue, key, object) => {
if (object[key] && object[key] !== sourceValue){
return [object[key], sourceValue];
if(_.isArray(object[key])) {
// Add the new value to the array and return
object[key].push(sourceValue);
return object[key];
}
else {
// Start the array of keys
return [object[key], sourceValue];
}
}
else {
// // https://lodash.com/docs/3.10.1#merge