Skip to content

Commit

Permalink
Remove null checks and refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyhuxng committed Mar 13, 2023
1 parent 54c52e3 commit 305466d
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 132 deletions.
13 changes: 4 additions & 9 deletions __mocks__/dh-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,22 +466,17 @@ class Format {
}

class FilterCondition {
constructor(type, parent) {
this.type = type;
this.parent = parent;
}

not() {
return new FilterCondition('not', this);
return new FilterCondition();
}
and(...condition) {
return new FilterCondition('and', this);
return new FilterCondition();
}
or(...condition) {
return new FilterCondition('or', this);
return new FilterCondition();
}
toString() {
return 'MockFilterCondition' + this.type;
return 'MockFilterCondition';
}
}

Expand Down
Loading

0 comments on commit 305466d

Please sign in to comment.