Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Suleiman <jansule@users.noreply.github.com>
  • Loading branch information
KaiVolland and jansule authored Dec 1, 2023
1 parent 9043e10 commit 2de63cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/MapboxStyleParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export class MapboxStyleParser implements StyleParser<Omit<MbStyle, 'sources'>>
throw new Error(`Could not resolve sprite ${spriteName}. No base url found.`);
}
if (!isString(spriteName)) {
throw new Error('Can not handle mapbox expressions for sprite names (e.g. icon-image).');
throw new Error('Cannot handle mapbox expressions for sprite names (e.g. icon-image).');
}

const data = await this.getSpriteData(spriteName);
Expand Down
4 changes: 2 additions & 2 deletions src/Util/MapboxStyleUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class MapboxStyleUtil {

public static getSpriteName(sprite: Sprite, metadata: MapboxRef): string {
if (!metadata?.sprite || !sprite) {
throw new Error('Can not retrieve sprite name. Sprite or metadata missing.');
throw new Error('Cannot retrieve sprite name. Sprite or metadata missing.');
}
const name = Object.keys(metadata.sprite)
.find(key => {
Expand All @@ -173,7 +173,7 @@ class MapboxStyleUtil {
value.size[1] === sprite.size[1];
});
if (!name) {
throw new Error('Can not retrieve sprite name. No matching sprite in metadata.');
throw new Error('Cannot retrieve sprite name. No matching sprite in metadata.');
}
return name || '';
}
Expand Down

0 comments on commit 2de63cc

Please sign in to comment.