aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-12-10 19:12:20 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-12-10 19:12:20 +0100
commit088f0a2c1ca5d305d83ff001650cca729643c718 (patch)
tree2af6d3accbe7d4edca5d748200b68bdd60e4afc4
parent65d25ee00ebed51ea87cdc419591481d1814d92c (diff)
Use when when there is no exact match
-rw-r--r--src/client/react/reducers/search.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/react/reducers/search.js b/src/client/react/reducers/search.js
index dd737ed..5d8fee5 100644
--- a/src/client/react/reducers/search.js
+++ b/src/client/react/reducers/search.js
@@ -29,7 +29,7 @@ const search = (state = DEFAULT_STATE, action) => {
switch (action.type) {
case 'SEARCH/INPUT_CHANGE': {
let results = getSearchResults(action.typedValue);
- let exactMatch = false;
+ let exactMatch = null;
if ((results.length > 0) && (action.typedValue === results[0].value)) {
[exactMatch] = results;