taxtank-core 1.0.27 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9110,7 +9110,10 @@ class BankTransactionCollection extends Collection {
9110
9110
  * get date of the last transaction
9111
9111
  */
9112
9112
  getLastTransactionDate() {
9113
- return new Date(Math.max.apply(Math, this.items.map((bankTransaction) => bankTransaction.date)));
9113
+ if (!this.length) {
9114
+ return null;
9115
+ }
9116
+ return new Date(Math.max(...this.items.map(transaction => transaction.date.getTime())));
9114
9117
  }
9115
9118
  /**
9116
9119
  * get list of credit transactions