mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +02:00
Fix stocks undefined bug
This commit is contained in:
@@ -79,7 +79,7 @@ module.exports = class StocksCommand extends Command {
|
||||
interval: '1min',
|
||||
apikey: ALPHA_VANTAGE_KEY
|
||||
});
|
||||
if (body['Error Message']) return null;
|
||||
if (body['Error Message'] || !body['Time Series (1min)']) return null;
|
||||
const data = Object.values(body['Time Series (1min)'])[0];
|
||||
return {
|
||||
symbol,
|
||||
|
||||
Reference in New Issue
Block a user