Skip to content

Commit

Permalink
fix: use defualt matchAll for empty where filter
Browse files Browse the repository at this point in the history
  • Loading branch information
mdegraw committed Nov 23, 2020
1 parent 3d12a22 commit 410fee6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/palantir.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ PalantirConnector.prototype.all = function(modelName, filter, options, callback)
});
} else { // search objects by filter
const url = PALANTIR_PATHS.objectSearch;
const body = {objectTypes: [this.settings.objectType]};
if (filter.where) {
body.filter = this.buildWhere(modelName, filter.where);
}
const body = {
objectTypes: [this.settings.objectType],
filter: this.buildWhere(modelName, filter.where),
};

const properties = this.buildFields(modelName, filter.fields);
if (!_.isEmpty(properties)) {
body.propertySelector = {propertyWhitelist: properties};
Expand Down

0 comments on commit 410fee6

Please sign in to comment.