Skip to content

Commit

Permalink
Prevent cascading issues with brandData being null.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Aug 17, 2024
1 parent 78f1803 commit 52bce09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/buttonTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ function SetTheme() {
}

export default function buttonTemplate() {
const { brandData, link } = buildUrl({ email: this.email, from: this.fromDomain });
const buildUrlData = buildUrl({ email: this.email, from: this.fromDomain });
if (!buildUrlData) {
return '';
}

const { brandData, link } = buildUrlData;

return html`
${SetTheme.call(this)}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/urlBuilder.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 52bce09

Please sign in to comment.