Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
TA2k committed Mar 28, 2024
1 parent 19d85b8 commit 2ac23e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ class Parcel extends utils.Adapter {
status = sendung.sendungsdetails.sendungsverlauf.kurzStatus;
}
if (sendung.sendungsdetails && sendung.sendungsdetails.liveTracking) {
status = status + ' ' + sendung.sendungsdetails.liveTracking.countdown + ' Stopps';
status = status + ' ' + sendung.sendungsdetails.liveTracking.countdown || 0 + ' Stopps';
}
if (sendung.sendungsdetails && sendung.sendungsdetails.zustellung && sendung.sendungsdetails.zustellung.zustellzeitfensterBis) {
const bisDate = new Date(sendung.sendungsdetails.zustellung.zustellzeitfensterBis).toLocaleTimeString('de-DE');
Expand Down Expand Up @@ -2322,6 +2322,12 @@ class Parcel extends utils.Adapter {
this.log.debug(res.data);
return;
}
if (status.includes('Erstattung veranlasst') && stateObject == {}) {
this.log.debug('No detail status found for ' + order.url);
this.log.debug(res.data);
return;
}

return {
id: document.querySelector('.pt-delivery-card-trackingId')
? document.querySelector('.pt-delivery-card-trackingId').textContent.replace('Trackingnummer ', '')
Expand Down

0 comments on commit 2ac23e0

Please sign in to comment.