Skip to content

Commit

Permalink
Update export-order.js
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 authored Jul 16, 2024
1 parent 4b2e1ee commit 0e5d47d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/lib/ux-group/export-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ module.exports = async (
headers: { Authorization: `Basic ${uxToken}` },
timeout: 7000
})
if (response && response.data && response.data.mensagem === 'OK' && response.data.resultados && && response.data.resultados.length) {
if (response?.data?.mensagem === 'OK' && response.data.resultados?.length) {
const result = response.data.resultados[0]
console.log('order sent', order._id, number, result.idSolicitacaoGerada, result.idSolicitacaoInterno)
const volume = result.listaVolumes && result.listaVolumes.length && result.listaVolumes[0]
Expand Down

0 comments on commit 0e5d47d

Please sign in to comment.