Skip to content

Commit a247642

Browse files
authored
Merge pull request #56 from TheCodeRaccoons/JorchCortez-patch-1
Fix error handling for undefined platform in ShareLink
2 parents b8463c8 + 9a9eb88 commit a247642

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)