logdna / logdna-cli

The LogDNA CLI allows you to signup for a new account and tail your server logs right from the command line.
https://logdna.com
MIT License
27 stars 21 forks source link

Fix issue with search where results with only 1 result aren't properly displayed #23

Closed jakedipity closed 5 years ago

jakedipity commented 5 years ago

When the export API returns a single result (regardless of using the number parameter), the result is parsed into an object by utils.apiCall (called by utils.apiGet). This fix checks the results of the utils.apiGet and handles the result properly if it's an object.

I also opted to use Lodash's type checking functions in the places I was working in.

smusali commented 5 years ago

Looks good to me! 👍