Skip to content

Commit

Permalink
fix: null check
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
ingase1 committed Apr 12, 2018
1 parent e024aae commit 6c4c7d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "ngx-odata-v4",
"version": "1.0.0",
"version": "1.0.1",
"scripts": {
"start": "tsc -p example && tsc -p src && concurrently \"tsc -p example -w\" \"tsc -p src -w\" \"lite-server --config sync-bs-config.json\" ",
"start": "tsc -p playground && tsc -p src && concurrently \"tsc -p playground -w\" \"tsc -p src -w\" \"lite-server --config sync-bs-config.json\" ",
"start:example": "tsc -p ./example/angular && concurrently \"tsc -p ./example/angular -w\" \"lite-server --config sync-bs-config-example.json\" ",
"yarn": "yarn",
"build": "yarn run rimraf dist && yarn run rimraf doc && yarn run build-lib && yarn run build-doc",
Expand Down
2 changes: 1 addition & 1 deletion src/objects/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class Query implements IBaseQueryActions {

public filter(field: string, operator: OperatorType, val2: any): Query {

if ((!field || field.length == 0) || (!val2 || val2.length == 0))
if ((field == null || field.length == 0) || (val2 == null || val2.length == 0))
return this;

if (typeof val2 == "string" && !Query.isGuid(val2) && val2.indexOf("'") === -1) {
Expand Down

0 comments on commit 6c4c7d4

Please sign in to comment.