Skip to content

Commit 9c7b8b3

Browse files
committed
fix: use async/await instead of .catch() in fireEvent callback
Made-with: Cursor
1 parent 292f33e commit 9c7b8b3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ export default class WebInterferenceDetection extends ContentFeature {
2020
// Get settings with conditionalChanges already applied by framework
2121
const settings = this.getFeatureSetting('interferenceTypes');
2222

23-
const fireEvent = (type) => {
24-
void this.callFeatureMethod('webEvents', 'fireEvent', { type }).catch(() => {
23+
const fireEvent = async (type) => {
24+
try {
25+
await this.callFeatureMethod('webEvents', 'fireEvent', { type });
26+
} catch {
2527
// webEvents may not be loaded on this platform — silently ignore
26-
});
28+
}
2729
};
2830

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

0 commit comments

Comments
 (0)