cheeaun / hackerweb

A simply readable Hacker News web app
http://hackerwebapp.com/
1.23k stars 133 forks source link

Unnecessary calls to hw.news.render(). #71

Open Leftium opened 2 years ago

Leftium commented 2 years ago

hw.news.render() is called for routes that don't display the news list, like https://hackerweb.app/#/about, or a specific news item.

This may result in unnecessary calls to the HN API. It also caused other problems in my fork.

I fixed it in my fork by moving the call like this: https://github.com/Leftium/hckrweb/commit/4845c1aeb3bd69cf9e8a5cadba56fa29b5c1f553