Skip to content

forked-to: Cannot set properties of undefined (setting 'href') #5435

Closed

Description

@kidonng

Please ensure:

  • The bug is caused by Refined GitHub. It doesn't happen if I disable the extension.
  • The bug happens after clearing extension cache. The "Clear cache" button below can also be found at the bottom of the options page.

Example URLs

Just browse around https://github.com/refined-github/refined-github and you will see it in the console

Extension version

22.2.22

Browser(s) used

Chrome

Description

TypeError: Cannot set properties of undefined (setting 'href')
    at init (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:7691:91)
    at async runFeature (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:3045:20)
    at async setupPageLoad (chrome-extension://hlepfoohegkhhmjieoechaddaejaokhf/build/refined-github.js:3055:34)

Seems related to #5417. Actual feature is not broken, just some weird error.

Include in this issue:

  • Screenshots/video/gif demonstrating the bug, if it’s visual
  • Console errors, if any

Activity

  1. fregante commented on May 21, 2022

    @fregante
    Member

    Fixed in my PR.

    The issue was that we add and expect a relative href attribute (/user/repo/page) but sort-conversations-by-update-time sets the href to a full URL.

    link.href = SearchQuery.from(link).add('sort:updated-desc').href;

    We could also just use full URLs in forked-to, but I feel that sort-conversations-by-update-time can be a better citizen instead.

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