Refined-github: console errors

Created on 18 Apr 2019  ·  9Comments  ·  Source: sindresorhus/refined-github

  • [x] On pr page
❌ pr-branches
content.js:1865 Error: GraphQL:
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
Argument 'number' on Field 'NaN' has an invalid value. Expected type 'Int!'.
  • [x] Almost all pages
❌ remove-projects-tab
content.js:1865 TypeError: Cannot read property 'parentElement' of null
    at content.js:2490
    at content.js:478
    at remove_projects_tab_init (content.js:2501)
    at async features_run (content.js:1860)
❌ show-names
content.js:1865 TypeError: Cannot read property 'name' of undefined
    at show_names_init (content.js:4586)
    at async details.init (content.js:1903)
    at async features_run (content.js:1860)

bug

Most helpful comment

All 9 comments

@bfred-it (dont want to open a new issue) side thing. Is it a new thing that clicking on the RG icon it does not open the options. Rather it takes you to github.com?

Yeah, I dropped the pop up because it’s options are already accessible via right click and it’s not something people actually need it that frequently. The only reason why we have a “browser_action” at all is for GHE users.

Also seeing this problem. Seems the parentElement issue is causing names to not appear properly, like so:

image

One more bug caused by pr-branches in combination with view-markdown-source:

https://github.com/sindresorhus/refined-github/blob/afac4478c1eea65f98cac19e80ce81e0f975b15e/.github/ISSUE_TEMPLATE/bug_report.md

Click on the View Source button and this happens:

Screenshot 2019-04-19 at 18 49 53

releases-tab is also broken.

@bfred-it I think a simple fix would be not to add the buttons if they are already added. What do you think? Are there any edge-cases that we may miss?

I tested with the above changes and the issue is not being reproduced. I've pushed the changes.

releases-tab is also broken.

Indeed. We are in a unique situation: _we_ are triggering pjax:end to the same page to potentially add features to the newly-injected markdown-source, but this means that any listener will expected a new page to be injected.

Come to think of it, this should already be prevented by <has-rgh>/onAjaxedPages 🤔

I think that maybe I should just drop the pjax:end event in view-markdown-source because it's not entirely correct.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shivapoudel picture shivapoudel  ·  3Comments

durka picture durka  ·  3Comments

hkdobrev picture hkdobrev  ·  3Comments

juliocanares picture juliocanares  ·  3Comments

pawelad picture pawelad  ·  3Comments