Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
fix: calculateShipment with a string service
Browse files Browse the repository at this point in the history
  • Loading branch information
jonyw4 committed Nov 24, 2020
1 parent 8b9262b commit 0349b56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MelhorEnvio/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ export class MelhorEnvio {
}
};

if (services && Array.isArray(services) && services.length > 0) {
data.services = services.join(',');
if (services) {
data.services = (Array.isArray(services) && services.length > 0) ? services.join(',') : services;
}
if (Array.isArray(productsOrPackageData)) {
data.products = productsOrPackageData;
Expand Down

0 comments on commit 0349b56

Please sign in to comment.