`comments-time-machine-links`: Cannot read property 'attributes' of null #3845
ThomsonTan 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 opening some github PR page (it could reproduce for many PR links), below error shows up in the F12 console window. The top frame in below stack is listed as the last line in below code snippet.
ā Refined GitHub ā comments-time-machine-links ā TypeError: Cannot read property 'attributes' of null at init (refined-github.js:5062) at runFeature (refined-github.js:2116) at setupPageLoad (refined-github.js:2124) at refined-github.js:2157
}), source_features.add("comments-time-machine-links", {
include: [ hasComments ],
init: function() {
const comments = select_dom.all('\n\t\t:not(.js-new-comment-form):not([id^="pullrequestreview"]) > .timeline-comment:not(.rgh-time-machine-links),\n\t\t.review-comment > .previewable-edit:not(.is-pending):not(.rgh-time-machine-links)\n\t');
for (const comment of comments) {
const timestamp = select_dom("relative-time", comment).attributes.datetime.value;