Skip to content

Commit

Permalink
chore: throw error if cloudname is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostdevv committed Sep 30, 2024
1 parent 6f3eede commit 007ff33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/svelte-cloudinary/src/helpers/getCldImageUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export function getCldImageUrl(
analyticsOverride,
);

if (!config.cloud?.cloudName) {
throw new Error('[svelte-cloudinary] unable to find a cloud name');
}

return constructCloudinaryUrl({
analytics,
config,
Expand Down

0 comments on commit 007ff33

Please sign in to comment.