Skip to content

comments-time-machine-links: Cannot read property 'attributes' of null #3845

Closed

Description

@ThomsonTan

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;

Activity

  1. fregante commented on Dec 26, 2020

    @fregante
    Member

    Thanks for the report! I believe this will be fixed by #3844

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions