Added BRC_NO_POOL error

This commit is contained in:
Alexander Cerutti
2019-06-30 02:02:24 +02:00
parent 25aa60ba99
commit c61921721e
2 changed files with 6 additions and 0 deletions

View File

@@ -415,6 +415,11 @@ export class Pass implements PassIndexSignature {
return this;
}
if (!(barcodes && barcodes.length)) {
barcodeDebug(formatMessage("BRC_NO_POOL"))
return this;
}
// Checking which object among barcodes has the same format of the specified one.
const index = barcodes.findIndex(b => b.format.toLowerCase().includes(chosenFormat.toLowerCase()));