From 3102983a4d715ebb4947e8fbdd18b8b2dd865ce8 Mon Sep 17 00:00:00 2001 From: Kushang Shah Date: Mon, 29 Jun 2020 07:46:10 +0530 Subject: [PATCH] Update search.js --- js/search.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/search.js b/js/search.js index cd0f2c8218..4035f674a6 100644 --- a/js/search.js +++ b/js/search.js @@ -11,12 +11,13 @@ * @constructor * @param {String} label The label to show the user. */ - var Backend = function (label) { + let Backend = function (label) { this.label = label; this.elements = {}; }; /** + * Adds an item to the backend. * * @param {String} id The item ID. It would help if this was unique. @@ -38,7 +39,7 @@ * * @return {Array} */ - Backend.prototype.toTypeaheadArray = function () { + Backend.prototype.toTypeaheadArray = () => { var array = []; $.each(this.elements, function (_, element) { @@ -112,7 +113,7 @@ * * @return {Boolean} */ - var canCache = function () { + var canCache = () => { try { return ('localStorage' in window && window['localStorage'] !== null && "JSON" in window && window["JSON"] !== null); } catch (e) {