Skip to content

Commit

Permalink
Improve checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Acconut committed Nov 25, 2024
1 parent dfe9722 commit 9e4c337
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Transloadit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,9 @@ export class Transloadit {
* Construct a signed Smart CDN URL. See https://transloadit.com/docs/topics/signature-authentication/#smart-cdn.
*/
getSignedSmartCDNUrl(opts: SmartCDNUrlOptions): string {
if (opts.workspace == null) throw new TypeError('workspace is required')
if (opts.template == null) throw new TypeError('template is required')
if (opts.input == null) throw new TypeError('input is required')
if (opts.workspace == null || opts.workspace === '') throw new TypeError('workspace is required')
if (opts.template == null || opts.template === '') throw new TypeError('template is required')
if (opts.input == null) throw new TypeError('input is required') // `input` can be an empty string.

const workspaceSlug = encodeURIComponent(opts.workspace)
const templateSlug = encodeURIComponent(opts.template)
Expand Down

0 comments on commit 9e4c337

Please sign in to comment.