From f112a554dd0c592090ec6eceac5cf42e9db0af41 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Wed, 3 Jan 2018 14:39:19 -0500 Subject: [PATCH] Checkstyle fix for common.js. --- themes/bootstrap3/js/common.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index 2963b97669e..36310e3dd7b 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -286,8 +286,12 @@ function setupAutocomplete() { // Update autocomplete on type change $('#searchForm_type').change(function searchTypeChange() { for (var i in cacheObj) { - for (var j in cacheObj[i]) { - delete cacheObj[i][j]; + if (cacheObj.hasOwnProperty(i)) { + for (var j in cacheObj[i]) { + if (cacheObj[i].hasOwnProperty(j)) { + delete cacheObj[i][j]; + } + } } } }); -- GitLab