Not using let in JS, as Gulp minify doesn't understand it :(

This commit is contained in:
Sybren A. Stüvel 2018-02-01 14:28:12 +01:00
parent 06b2adf923
commit d85c45f10f
2 changed files with 6 additions and 6 deletions

View File

@ -128,7 +128,7 @@ $(document).ready(function() {
var storeValue = function(values, label) {
return function(item) {
let refined = search.isRefined(label, item.key);
var refined = search.isRefined(label, item.key);
values.push({
facet: label,
label: item.key,
@ -142,8 +142,8 @@ $(document).ready(function() {
var facets = [];
var aggs = content.aggs;
for (var label in aggs) {
let values = [];
let buckets = aggs[label].buckets;
var values = [];
var buckets = aggs[label].buckets;
if (buckets.length === 0) {
continue;

View File

@ -75,7 +75,7 @@ var elasticSearcher = (function() {
$.getJSON("/api/newsearch" + deze.url + "?"+ pstr)
.done(function (data) {
let hits = data.hits.hits;
var hits = data.hits.hits;
var newhits = hits.map(function(hit){
return hit._source;
});
@ -128,13 +128,13 @@ var elasticSearch = (function($, url) {
$.fn.getSearch = function(q, cb, async, url){
let newhits = [];
var newhits = [];
if(url === undefined){
url = '';
}
$.getJSON("/api/newsearch" + url + "?q=" + q, function( data ) {
let hits = data.hits.hits;
var hits = data.hits.hits;
newhits = hits.map(function(hit){
return hit._source;
});