Skip to content

Commit 9a9eb88

Browse files
authored
Fix error handling for undefined platform in ShareLink
Signed-off-by: Jorge C. <jacortez_94@hotmail.com>
1 parent b8463c8 commit 9a9eb88

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Dist/Functional/ShareLink.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class ShareLink {
2626
};
2727

2828
let _link = socialSelectors[this.platform];
29-
if(!_link) return; // handle errors if the platform has issues
29+
if(!_link && !this.platform) return; // handle errors if the platform has issues
3030

31-
if(_link === 'copy') {
31+
if(this.platform === 'copy') {
3232
this.element.addEventListener('click', () => navigator.clipboard.writeText(`${this.url}`));
3333
}
3434
else{

0 commit comments

Comments
 (0)