Restore search/report links in Safari's console#9069
Conversation
Co-authored-by: fregante <[email protected]>
|
Might cover other extensions too, but it's worth a try. Better than nothing at all. |
|
@copilot fix the lint error too. |
Co-authored-by: fregante <[email protected]>
Head branch was pushed to by a user without write access
Fixed in 1e81c97. Restructured the condition to |
|
@copilot revert the change and just silence the lint rule instead. Add an explanation in the comment saying it's a false positive |
…comment explaining false positive Co-authored-by: fregante <[email protected]>
Head branch was pushed to by a user without write access
| const error = event.reason; // Access only once | ||
| // Don't use `assertError` or it'll loop | ||
| if (error?.stack.includes('-extension://')) { | ||
| // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- False positive: `||` is used on booleans, not nullish values |
There was a problem hiding this comment.
Eh, the type is undefined | boolean, so it's both
Safari masks extension stack URLs as
webkit-masked-url://hidden/instead ofchrome-extension:///moz-extension://, so theunhandledrejectionguard incatchErrors()never matched, silently swallowing errors without logging the Search/Report links.source/helpers/errors.ts: extend the stack URL check to also acceptwebkit-masked-url://, silencing the@typescript-eslint/prefer-nullish-coalescinglint rule with a comment explaining it's a false positive (||is used on booleans, not nullish values):Test URLs
N/A — console output only; repro via #8216
Screenshot
After this fix, Safari should show the same Search/Report issue links as Chrome.
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.