File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -763,14 +763,18 @@ class SocialShareButton {
763763 } ) ;
764764 const el = this . _getContainer ( ) ;
765765 ( el || document ) . dispatchEvent ( domEvent ) ;
766- } catch ( _ ) { }
766+ } catch ( _ ) {
767+ // Ignore DOM event errors; analytics is best-effort.
768+ }
767769 }
768770
769771 // Path 2 — onAnalytics callback (direct, single-consumer hook)
770772 if ( typeof this . options . onAnalytics === "function" ) {
771773 try {
772774 this . options . onAnalytics ( payload ) ;
773- } catch ( _ ) { }
775+ } catch ( _ ) {
776+ // Ignore analytics handler errors to avoid breaking share flow.
777+ }
774778 }
775779
776780 // Path 3 — plugin / adapter registry (supports multiple simultaneous consumers)
@@ -779,7 +783,9 @@ class SocialShareButton {
779783 if ( plugin && typeof plugin . track === "function" ) {
780784 try {
781785 plugin . track ( payload ) ;
782- } catch ( _ ) { }
786+ } catch ( _ ) {
787+ // Ignore plugin errors to keep analytics best-effort.
788+ }
783789 }
784790 }
785791 }
You can’t perform that action at this time.
0 commit comments