Skip to content

Commit e78b829

Browse files
Try catch notify messaging (#1592)
Due to concerns about missing handlers in WebKit, adding a try catch here just for safey sake. (we're expecting to fix this next week on the handler side).
1 parent 14aa665 commit e78b829

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

injected/src/content-feature.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,13 @@ export default class ContentFeature extends ConfigFeature {
217217
addDebugFlag() {
218218
if (this.#isDebugFlagSet) return;
219219
this.#isDebugFlagSet = true;
220-
this.messaging?.notify('addDebugFlag', {
221-
flag: this.name,
222-
});
220+
try {
221+
this.messaging?.notify('addDebugFlag', {
222+
flag: this.name,
223+
});
224+
} catch (_e) {
225+
// Ignore thrown error from a potentially missing handler (on WebKit).
226+
}
223227
}
224228

225229
/**

0 commit comments

Comments
 (0)