Skip to content

Commit bc9690a

Browse files
fix strict comparaison for boolean
1 parent 9faec25 commit bc9690a

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
composer.json
66
composer.lock
77

8-
dist
98
docker
109
node_modules
1110
vendor

bower.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "autocomplete.js",
3+
"description": "autocomplete.js is JavaScript library, lite, fast, stable, using the JavaScript Strict Mode and validated by JSHint.",
4+
"main": "",
5+
"authors": [
6+
"support@autocomplete-js.com"
7+
],
8+
"license": "MIT",
9+
"keywords": [
10+
"autocomplete"
11+
],
12+
"homepage": "https://github.com/autocompletejs/autocomplete.js",
13+
"ignore": [
14+
"**/.*",
15+
"node_modules",
16+
"bower_components",
17+
"test",
18+
"tests"
19+
]
20+
}

src/autocomplete.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ class AutoComplete {
450450
Not: boolean,
451451
To: number
452452
}) {
453-
if ((match == true && mapping.Operator == ConditionOperator.AND) || (match == false && ConditionOperator.OR)) {
453+
if ((match === true && mapping.Operator == ConditionOperator.AND) || (match === false && ConditionOperator.OR)) {
454454
condition = AutoComplete.merge({
455455
Not: false
456456
}, condition);
@@ -474,7 +474,7 @@ class AutoComplete {
474474
}
475475
});
476476

477-
if (match == true) {
477+
if (match === true) {
478478
mapping.Callback.bind(params, event)();
479479
}
480480
};
@@ -485,7 +485,7 @@ class AutoComplete {
485485
window.clearTimeout(params.$AjaxTimer);
486486
}
487487

488-
if (timeout == true) {
488+
if (timeout === true) {
489489
params.$AjaxTimer = window.setTimeout(AutoComplete.prototype.ajax.bind(null, params, callback, false), params.Delay);
490490
} else {
491491
if (params.Request) {

0 commit comments

Comments
 (0)