santinic / how2

AI for the Command Line
https://how2terminal.com
MIT License
5.72k stars 154 forks source link

safely access link #88

Closed jamesalbert closed 6 years ago

jamesalbert commented 6 years ago

I was getting TypeError: Cannot read property 'indexOf' of null when running how2 cat (described further at #86). It may be a little hacky though :)

PaoloCifariello commented 6 years ago

Thank you @jamesalbert. Yes, it seems hacky and we should probably move to a Promise-based approach. I am planning to refactor the code, but in the meanwhile this fix is totally acceptable.