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 => {