Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
CarlRosell opened this issue May 25, 2020 · 7 comments · Fixed by #3314
Closed

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

CarlRosell opened this issue May 25, 2020 · 7 comments · Fixed by #3314
Labels

Comments

@CarlRosell
Copy link

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. 😛

@CarlRosell CarlRosell added the bug label May 25, 2020
@fregante
Copy link
Member

fregante commented May 25, 2020

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.

@CarlRosell
Copy link
Author

image

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.

@fregante
Copy link
Member

fregante commented May 25, 2020

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

@CarlRosell
Copy link
Author

Untitled

@yakov116
Copy link
Member

yakov116 commented Jul 1, 2020

@fregante
Copy link
Member

fregante commented Jul 3, 2020

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

@fregante
Copy link
Member

fregante commented Jul 3, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

3 participants