synchronous-autocomplete
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -38,4 +38,3 @@ 'use strict'; | ||
if (!Array.isArray(tokens[_token])) tokens[_token] = []; | ||
if (!tokens[_token].includes(id)) tokens[_token].push(id); | ||
if (!Array.isArray(tokens[_token])) tokens[_token] = [id];else tokens[_token].push(id); | ||
} | ||
@@ -42,0 +41,0 @@ } catch (err) { |
{ | ||
"name": "synchronous-autocomplete", | ||
"description": "Fast, simple autocompletion.", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -22,4 +22,4 @@ 'use strict' | ||
for (let token of tokensOfItem) { | ||
if (!Array.isArray(tokens[token])) tokens[token] = [] | ||
if (!tokens[token].includes(id)) tokens[token].push(id) | ||
if (!Array.isArray(tokens[token])) tokens[token] = [id] | ||
else tokens[token].push(id) | ||
} | ||
@@ -26,0 +26,0 @@ |
15147
267