plibither8 / refined-hacker-news

✨ Hacker News, but refined — Interface tweaks and features to make the HN experience better
MIT License
808 stars 34 forks source link

Error in console #121

Closed lookfirst closed 2 years ago

lookfirst commented 2 years ago

2022-09-25 at 17 49 49

2022-09-25 at 17 50 23

plibither8 commented 2 years ago

Hi @lookfirst, thanks for bringing this up! I too noticed it today, along with another bug regarding the positioning of the "favorite" link. I'll be looking into this and soon have an update ready. Thanks again :)

lookfirst commented 2 years ago

Yea, I just noticed that I can't 'favorite' or 'flag' comments any more.

Looking at the code in utils.js, I'd re-work the general logic at the arrows too... you're basically checking for it to be null after having tried to use it...

2022-09-25 at 17 53 36

I think this logic can be simplified a lot.

plibither8 commented 2 years ago

Good catch with that! Not shifting blame, but I recall those lines of code being part of someone else's PR -- should've tested it out better back then 😄.

The entire codebase is in serious need of a refactor, since the code basically represents my abilities and understanding of when I was in highschool xD. Hopefully I've matured enough since to make it more error-prone now, when I get a chance too. :)

plibither8 commented 2 years ago

I've fixed this bug, along with a few other and pushed the update for review to the Chrome Webstore. It should be live in a couple of days.

lookfirst commented 2 years ago

@plibither8 No worries and no blame! Thanks for the fast action on things. Super appreciate it.