@danidoble/webserial 4.1.4 → 4.1.5

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.
package/dist/webserial.js CHANGED
@@ -8479,14 +8479,18 @@ Re = function({ dispensed: t = null, limit: e = 80 } = {}) {
8479
8479
  };
8480
8480
  return i(1e3, "p1000"), i(500, "p500"), i(200, "p200"), i(100, "p100"), i(50, "p50"), i(20, "p20"), e.will_dispense = Object.values(e.banknotes).some((s) => s > 0), e;
8481
8481
  }, In = function(t) {
8482
- return o(this, w, Ae).call(this) ? o(this, w, aa).call(this, t) : o(this, w, oa).call(this, t);
8482
+ return this.hasRecycler ? o(this, w, Ae).call(this) ? o(this, w, aa).call(this, t) : o(this, w, oa).call(this, t) : {
8483
+ banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
8484
+ pending: t,
8485
+ will_dispense: !1
8486
+ };
8483
8487
  }, On = function(t) {
8484
8488
  const e = {
8485
8489
  coins: { $_50c: 0, $_1: 0, $_2: 0, $_5: 0, $_10: 0 },
8486
8490
  pending: t,
8487
8491
  will_dispense: !1
8488
8492
  };
8489
- if (t <= 0 || this.totalInTubes === 0) return e;
8493
+ if (!this.hasCoinPurse || t <= 0 || this.totalInTubes === 0) return e;
8490
8494
  const i = (s, a, c = null) => {
8491
8495
  if (this.coins.tubes[a] > 0) {
8492
8496
  c === null && (c = "$_" + s);