From 24d663708ba4915913de6af949e5462e1aa209a9 Mon Sep 17 00:00:00 2001 From: siiky Date: Wed, 13 Nov 2024 14:29:31 +0000 Subject: [PATCH] fix: always resolve dispense --- lib/genmega/genmega-dispenser/genmega-dispenser.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/genmega/genmega-dispenser/genmega-dispenser.js b/lib/genmega/genmega-dispenser/genmega-dispenser.js index a264c4f47..89eb7f342 100644 --- a/lib/genmega/genmega-dispenser/genmega-dispenser.js +++ b/lib/genmega/genmega-dispenser/genmega-dispenser.js @@ -96,10 +96,9 @@ BillDispenser.prototype._retract = function () { BillDispenser.prototype.dispense = function dispense (notes, _currentBatch, _batchAmount) { const asDispenser = resolve => { const ret = this._dispense(notes) - if (ret.error) { + if (ret.error) this.close() - return resolve(ret) - } + return resolve(ret) } const asRecycler = resolve => {