From a0bb2322d1e22d281f2e1f38b34d0ebe1bda690a Mon Sep 17 00:00:00 2001 From: Moxiegirl Date: Mon, 11 Feb 2019 08:19:13 -0800 Subject: [PATCH] Updating after audit (#127) Signed-off-by: Mary Anthony --- assets/js/main.js | 23 +++++++++-------------- package-lock.json | 2 +- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index 1b043ed1..f0b09bc2 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -8774,11 +8774,12 @@ var _$LiteralSearchStrategy_6 = new LiteralSearchStrategy(); function LiteralSearchStrategy() { this.matches = function(str, crit) { - if (typeof str !== "string") { - return false; - } - str = str.trim(); - return str.toLowerCase().indexOf(crit.toLowerCase()) >= 0; + if (!str) return false; + str = str.trim().toLowerCase(); + crit = crit.toLowerCase(); + return crit.split(" ").filter(function(word) { + return str.indexOf(word) >= 0; + }).length > 0; }; } "use strict"; @@ -8904,11 +8905,9 @@ function merge(defaultParams, mergeParams) { var mergedOptions = {}; for (var option in defaultParams) { - if (Object.prototype.hasOwnProperty.call(defaultParams, option)) { - mergedOptions[option] = defaultParams[option]; - if (typeof mergeParams[option] !== "undefined") { - mergedOptions[option] = mergeParams[option]; - } + mergedOptions[option] = defaultParams[option]; + if (typeof mergeParams[option] !== "undefined") { + mergedOptions[option] = mergeParams[option]; } } return mergedOptions; @@ -8969,10 +8968,6 @@ search: search }; }; - window.SimpleJekyllSearch.init = window.SimpleJekyllSearch; - if (typeof window.SimpleJekyllSearchInit === "function") { - window.SimpleJekyllSearchInit.call(this, window.SimpleJekyllSearch); - } function initWithJSON(json) { options.success(json); _$Repository_4.put(json); diff --git a/package-lock.json b/package-lock.json index 68f5f784..7b010c74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1325,7 +1325,7 @@ }, "ncp": { "version": "2.0.0", - "resolved": "http://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", "dev": true },