sindresorhus/refined-github

`clean-sidebar`: can't access property "nextElementSibling", header is null #3134

CarlRosell posted onGitHub

<!-- Thanks for reporting a bug! â›° 1. Make sure the bug is caused by Refined GitHub. Try disabling the extension first. 2. Include a full URL where the bug appears. 3. Include a screenshot/gif Issues without a URL/screenshot will be closed -->

When having a repository with "projects" turned off, this header is null https://github.com/sindresorhus/refined-github/blob/173e39faf0fadc97e134d06d61911ebd86b418fb/source/features/clean-sidebar.tsx#L37-L43 but there is only a null check for nextElementSibling and not header

A link to a repo is not so valuable as you have to be an owner of the repo in order to see this bug. 😛


That’s strange, I regularly test the feature on this repo and Projects are disabled here too. Are you sure it’s erroring on Projects specifically?

The dropdown also includes the user’s project so it should always appear since they can’t be disabled.

posted by fregante almost 5 years ago

<img width="1131" alt="image" src="https://user-images.githubusercontent.com/2036823/82794939-8d767600-9e73-11ea-8a23-847ac328920d.png">

this is as far as I came to debugging. It did not throw when I had projects enabled. but when I did disable it threw again. I should say that this is not under personal repo, it's in an organization and there you can disable projects.

posted by CarlRosell almost 5 years ago

Can you post a screenshot of your sidebar with RGH disabled and projects disabled?

posted by fregante almost 5 years ago
posted by CarlRosell almost 5 years ago
posted by yakov116 almost 5 years ago

I can’t replicate, but my guess is that the container itself is missing. Let’s add a if !container, return

posted by fregante almost 5 years ago

I can’t replicate, but my guess is that the container itself is missing. Let’s add a if !container, return false

posted by fregante almost 5 years ago

Fund this Issue

$0.00
Funded

Pull requests