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

View File

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