sindresorhus/refined-github
The issue has been closed
`set-default-repositories-type-to-sources`: undefined is not an object (evaluating 'link.search') #3908
fregante posted onGitHub
<img width="421" alt="Screen Shot 1" src="https://user-images.githubusercontent.com/1402241/105560421-4b8b2180-5cd9-11eb-887f-87ce95f81912.png">
- Open a PR like https://github.com/sindresorhus/refined-github/pull/3904
- Visit the PR Commits tab
- Open the profile dropdown
<img width="201" alt="Screen Shot 3" src="https://user-images.githubusercontent.com/1402241/105560491-79706600-5cd9-11eb-8591-2fb8229a6e10.png">
This happens because:
init
is called on every ajax loadinit
attaches a mutation handler- when the user opens the dropdown, the handler fires twice, but the second time the selector no longer finds anything