sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

`hide-markdown-diff`: throws on pre-fork edit pages #4194

fregante posted onGitHub

URL: https://github.com/MatthewL246/hello-world/edit/main/CONTRIBUTING.md

Refined GitHub → hide-markdown-diff → TypeError: undefined has no properties
    init hide-markdown-diff.tsx:24
    runFeature index.tsx:125
    setupPageLoad index.tsx:147
    add index.tsx:248
    $e pjax.ts:98
    Ne pjax.ts:311
    execute navigation.ts:62
    execute navigation.ts:17
    Y index.js:96

Console error only, not a real issue. I'm not sure if we should start fixing these issues in more direct ways instead of through exclude, which might not work with elementReady features.

For example in this case, if the first expected item isn't found, let the error throw only if it's not isEmptyPage. I wonder if this mechanism should be implemented via some sort of "deferred exclude" list of checks, or if exclude should just be treated this way (likely troublesome)


In the past we did a check on these pages to make sure the selector exists

posted by yakov116 about 4 years ago

We have that in many other pages but then we make all errors silent, we need a better way to handle that

posted by fregante about 4 years ago

we need a better way to handle that

But that is in general, by having a detection if a specific selector exists. I think such a thing will be very hard if we are supporting GHE. Since the DOM will change and the warning will be moot for some users.

posted by yakov116 about 4 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests