Skip to content

Commit

Permalink
fix: handle error when HubSpot options are wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
iamandrewluca committed Nov 20, 2021
1 parent 02ae855 commit ae47b2f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hubspot-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export default defineComponent({

const form = hbspt.forms.create({ ...props.options, target: `#${id}` });

if (!form) return error()

form.onReady(async () => {
if (!divRef.value) return

Expand Down

0 comments on commit ae47b2f

Please sign in to comment.