From 120c73d8972ed281315be9486ab29dc433ff0994 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 30 Mar 2020 14:35:20 -0400 Subject: [PATCH] Fix error in USPS if package status update isn't available --- commands/search/usps-tracking.js | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/search/usps-tracking.js b/commands/search/usps-tracking.js index 31c18dcd..112a5a01 100644 --- a/commands/search/usps-tracking.js +++ b/commands/search/usps-tracking.js @@ -34,13 +34,13 @@ module.exports = class USPSTrackingCommand extends Command { async run(msg, { id }) { try { - const { expected, summary } = await this.fetchStatus(id); - if (!summary) return msg.say('A status update is not yet available on your package. Check back soon.'); + const data = await this.fetchStatus(id); + if (!data) return msg.say('A status update is not yet available on your package. Check back soon.'); return msg.say(stripIndents` **Tracking info for ${id}:** - ${summary} + ${data.summary} - Expected Delivery by: ${expected || 'N/A'} + Expected Delivery by: ${data.expected || 'N/A'} More Info: `); } catch (err) { diff --git a/package.json b/package.json index 1cfda033..b201eaa5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "112.19.2", + "version": "112.19.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {