@managesome/eposmatic-toolkit 0.2.518 → 0.2.520

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.
@@ -19,4 +19,4 @@ export type VariantSize = '64x64' | '128x128' | '256x256' | '512x512';
19
19
  * precomputed variants are never re-variantized (e.g. `prod-managesome-variants`
20
20
  * must not become `...-variants-variants`).
21
21
  */
22
- export declare function getImageVariantUrl(downloadUrl: string, size: VariantSize): string;
22
+ export declare function getImageVariantUrl(downloadUrl: string | null | undefined, size: VariantSize): string | undefined;
@@ -22,6 +22,8 @@ const VARIANTS_HOST = 'firebasestorage.googleapis.com';
22
22
  * must not become `...-variants-variants`).
23
23
  */
24
24
  function getImageVariantUrl(downloadUrl, size) {
25
+ if (!downloadUrl)
26
+ return;
25
27
  let url;
26
28
  try {
27
29
  url = new URL(downloadUrl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.518",
3
+ "version": "0.2.520",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",