@carto/api-client 0.5.23 → 0.5.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  ## 0.5
6
6
 
7
+ ### 0.5.24
8
+
9
+ - fix(fetchMap): Don't fetch fonts when invoked outside browser (#264)
10
+
7
11
  ### 0.5.23
8
12
 
9
13
  - fix(fetchMap): Add tag-mapId to requests (#255)
@@ -11388,7 +11388,7 @@ async function fetchMap({
11388
11388
  const pointType = layer.props?.pointType || "";
11389
11389
  return pointType.includes("text");
11390
11390
  });
11391
- if (textLayers.length && window.FontFace && !document.fonts.check("12px Inter")) {
11391
+ if (textLayers.length && typeof window !== "undefined" && typeof document !== "undefined" && window.FontFace && document.fonts && !document.fonts.check("12px Inter")) {
11392
11392
  const font = new FontFace(
11393
11393
  "Inter",
11394
11394
  "url(https://fonts.gstatic.com/s/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7W0Q5nw.woff2)"