Hello, I really like this module, especially how it's developed to be used directly in weather applications (based on the user's current city). However, I detected a problem when calling getSmartJSON
The callback function in method getSmartJSON is not working correctly --> neither the err object nor the smart object is returned, and I get this error when I run this code or even when I run the example.js code:
/Users/abc/Projects/openweather-apis/index.js:192
smartJSON.temp = jsonObj.main.temp;
TypeError: Cannot read property 'temp' of undefined
at /Users/abc/Projects/openweather-apis/index.js:192:37
at IncomingMessage.<anonymous> (/Users/abc/Projects/openweather-apis/index.js:265:18)
at IncomingMessage.emit (node:events:339:22)
at endReadableNT (node:internal/streams/readable:1289:12)
at processTicksAndRejections (node:internal/process/task_queues:80:21)
This is a bug, I think that the function behind the callback is throwing an error rather than returning an error or a result.
Hello, I really like this module, especially how it's developed to be used directly in weather applications (based on the user's current city). However, I detected a problem when calling getSmartJSON
The callback function in method getSmartJSON is not working correctly --> neither the err object nor the smart object is returned, and I get this error when I run this code or even when I run the example.js code:
The error
This is a bug, I think that the function behind the callback is throwing an error rather than returning an error or a result.