Skip to content

Commit

Permalink
fix: don't encode via parameter when it is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Dabolus committed Mar 8, 2024
1 parent f7cc2d0 commit 0b94e87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/targets/x.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class XShareTarget extends HTMLElement implements ShareTarget {
shareMenu.openWindow('https://x.com/intent/post', {
text: `${shareMenu.title}\n${shareMenu.text}`,
url: shareMenu.url,
via: this.via,
via: this.via ?? undefined,
...(this.hashtags.length > 0 && { hashtags: this.hashtags.join(',') }),
});
}
Expand Down

0 comments on commit 0b94e87

Please sign in to comment.