Skip to content

Commit

Permalink
Avoid throwing styleimagemissing event for empty strings (#8840)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Hamley committed Oct 9, 2019
1 parent 7aa025a commit 1fee5f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/bucket/symbol_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class SymbolBucket implements Bucket {
// this allows us to fire the styleimagemissing event if image evaluation returns null
// the only way to distinguish between null returned from a coalesce statement with no valid images
// and null returned because icon-image wasn't defined is to check whether or not iconImage.parameters is an empty object
const hasIcon = iconImage.value.kind !== 'constant' || !!iconImage.value.value || Object.keys(iconImage.parameters).length > 0;
const hasIcon = (iconImage.value.kind !== 'constant' || !!iconImage.value.value) && Object.keys(iconImage.parameters).length > 0;
const symbolSortKey = layout.get('symbol-sort-key');

this.features = [];
Expand Down

0 comments on commit 1fee5f1

Please sign in to comment.