3 ms·
It doesn't load for me in Chrome either. In the function fetchRedditStories, it looks like that the callback param in the catch is named `e`, but it tries to l
by StrangeSound 6y ago
It doesn't load for me in Chrome either.
In the function fetchRedditStories, it looks like that the callback param in the catch is named `e`, but it tries to log `error`.
Checking the network panel I'm getting a 200, but I'm pretty sure it's failing anyway because of the ReferenceError
- thesephist 6y agoDarn, can't believe I didn't catch that typo until now. I don't think that was the issue -- unbound variables don't cause exceptions in JS until that variable is dereferenced -- but not sure what else it could be if the reddit api hit is succeeding with a 200. Maybe a wonky JSON Decode?
- eitland 6y ago> Darn, can't believe I didn't catch that typo until now. I don't think that was the issue -- unbound variables don't cause exceptions in JS until that variable is dereferenced The underlying problem here is using Javascript instead of TypeScript. And of course under that problem there's the problem of Javascript bit being TypeScript in the first place. (Not a bad word about Brendan Eich though, considering that the language was created by one man in three weeks it is amazing, but it is still sad that we ended up with an untyped language in such a critical place.)