Skip to content

Avoid some console errors when attempting to edit files on non-own repos - #5632

Merged
fregante merged 4 commits into
mainfrom
no-pre-fork-errors
May 20, 2022
Merged

fregante merged 4 commits into
mainfrom
no-pre-fork-errors

Conversation

@fregante

Copy link
Copy Markdown
Member

@fregante fregante left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Untested

pageDetect.isPRConversation,
],
exclude: [
pageDetect.isBlank,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature awaits DOM ready, so it can use exclude


(await elementReady('.file'))!.after(
const file = await elementReady('.file');
if (!file && pageDetect.isBlank()) {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature does not await DOM ready, so it cannot use exclude. This logic somewhat matches the "global blankslate catcher" pattern

@fregante fregante changed the title Avoid pre-fork errors in avoid-accidental-submissions and list-prs-for-file Avoid some console errors when attempting to edit files on non-own repos May 20, 2022
@fregante
fregante marked this pull request as ready for review May 20, 2022 04:13
@fregante
fregante merged commit e2a3e06 into main May 20, 2022
@fregante
fregante deleted the no-pre-fork-errors branch May 20, 2022 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

avoid-accidental-submissions throws on pre-fork edit pages

2 participants