Skip to content

Commit

Permalink
Fixup filter-has-id
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand Thakker committed Dec 13, 2017
1 parent 954dc89 commit e723086
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/style-spec/expression/definitions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ CompoundExpression.register(expressions, {
],
'filter-has-id': [
BooleanType,
[ValueType],
[],
(ctx) => ctx.id() !== null
],
'filter-type-in': [
Expand Down
1 change: 1 addition & 0 deletions src/style-spec/feature_filter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function createFilter(filter: any): FeatureFilter {

const compiled = createExpression(filter, filterSpec);
if (compiled.result === 'error') {
console.error(filter)
throw new Error(compiled.value.map(err => `${err.key}: ${err.message}`).join(', '));
} else {
return (globalProperties: GlobalProperties, feature: VectorTileFeature) => compiled.value.evaluate(globalProperties, feature);
Expand Down

0 comments on commit e723086

Please sign in to comment.