Skip to content

Commit

Permalink
v2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienElet committed Mar 19, 2020
1 parent d096251 commit 8aef0a3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
28 changes: 22 additions & 6 deletions angular-sql-query.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,12 +773,28 @@
var resourceValue = path(filterPath, resource);
var filterValue = filtersParams[filterKey];

return angular.isArray(filterValue) ? filterValue.some(function (value) {
return angular.equals(value, resourceValue);
}) // In for array
: angular.isArray(resourceValue) ? resourceValue.some(function (value) {
return angular.equals(value, filterValue);
}) : angular.equals(filterValue, resourceValue); // Equal for single value
if (angular.isArray(filterValue) && angular.isArray(resourceValue)) {
return filterValue.every(function (filter) {
return resourceValue.some(function (value) {
return angular.equals(filter, value);
});
});
}

// In for array
if (angular.isArray(filterValue)) {
return filterValue.some(function (value) {
return angular.equals(value, resourceValue);
});
}

if (angular.isArray(resourceValue)) {
return resourceValue.some(function (value) {
return angular.equals(value, filterValue);
});
}

return angular.equals(filterValue, resourceValue); // Equal for single value
});
});
}
Expand Down
2 changes: 1 addition & 1 deletion angular-sql-query.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-sql-query",
"description": "Make simple query on a SQLite database",
"version": "2.3.0",
"version": "2.4.0",
"main": "index.js",
"repository": {
"type": "git",
Expand Down

0 comments on commit 8aef0a3

Please sign in to comment.