From 2de63cc64d3b7c7ad81efc6308c5fa372d6f5196 Mon Sep 17 00:00:00 2001 From: Kai Volland Date: Fri, 1 Dec 2023 10:00:29 +0100 Subject: [PATCH] fix: typos Co-authored-by: Jan Suleiman --- src/MapboxStyleParser.ts | 2 +- src/Util/MapboxStyleUtil.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MapboxStyleParser.ts b/src/MapboxStyleParser.ts index 4519d8a..b677eee 100644 --- a/src/MapboxStyleParser.ts +++ b/src/MapboxStyleParser.ts @@ -334,7 +334,7 @@ export class MapboxStyleParser implements StyleParser> 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); diff --git a/src/Util/MapboxStyleUtil.ts b/src/Util/MapboxStyleUtil.ts index 22a33da..e56fd6c 100644 --- a/src/Util/MapboxStyleUtil.ts +++ b/src/Util/MapboxStyleUtil.ts @@ -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 => { @@ -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 || ''; }