Skip to content

Commit a8ed8f0

Browse files
committed
Merge branch 'develop'
2 parents 421664e + 794920c commit a8ed8f0

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

loopdk.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ projects[search_api_search_node][type] = "module"
212212
projects[search_api_search_node][subdir] = "contrib"
213213
projects[search_api_search_node][download][type] = "git"
214214
projects[search_api_search_node][download][url] = "http://github.com/search-node/search_api_search_node.git"
215-
projects[search_api_search_node][download][tag] = "7.x-1.1.6"
215+
projects[search_api_search_node][download][tag] = "7.x-1.1.8"
216216

217217
projects[search_node_page][type] = "module"
218218
projects[search_node_page][subdir] = "contrib"

modules/loop_search_node/js/loopSearchBoxController.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,20 @@ angular.module('searchBoxApp').controller('loopSearchBoxController', ['CONFIG',
240240
function filterUpdated(data) {
241241
$scope.query.text = '';
242242

243-
delete $scope.query.filters['taxonomy'][data['filter']];
243+
// Ensure that data structure exists in the search query before accessing
244+
// it.
245+
if (!$scope.query.hasOwnProperty('filters')) {
246+
$scope.query.filters = {
247+
'taxonomy': {}
248+
}
249+
}
250+
if (!$scope.query.filters.hasOwnProperty('taxonomy')) {
251+
$scope.query.filter.taxonomy = { }
252+
}
253+
254+
if ($scope.query.filters.taxonomy.hasOwnProperty(data['filter'])) {
255+
delete $scope.query.filters['taxonomy'][data['filter']];
256+
}
244257
$scope.query.filters['taxonomy'][data['filter']] = {};
245258
$scope.query.filters['taxonomy'][data['filter']][data['selection']] = true;
246259

0 commit comments

Comments
 (0)