Skip to content

Commit 292f33e

Browse files
committed
fix: handle promise rejection in fireEvent callback
Made-with: Cursor
1 parent dc2e53b commit 292f33e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

injected/src/features/web-interference-detection.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ export default class WebInterferenceDetection extends ContentFeature {
2121
const settings = this.getFeatureSetting('interferenceTypes');
2222

2323
const fireEvent = (type) => {
24-
void this.callFeatureMethod('webEvents', 'fireEvent', { type });
24+
void this.callFeatureMethod('webEvents', 'fireEvent', { type }).catch(() => {
25+
// webEvents may not be loaded on this platform — silently ignore
26+
});
2527
};
2628

2729
runYoutubeAdDetection(settings?.youtubeAds, this.log, fireEvent);

0 commit comments

Comments
 (0)