Skip to content

Commit

Permalink
FILE adjust name replace product name with product code
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreKelling committed Mar 14, 2024
1 parent 72bf0bc commit 111011f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jspdf-product-label-54x70",
"version": "1.2.9",
"version": "1.2.10",
"main": "src/app.js",
"author": "André Kelling",
"description": "Dymo Label PDF printing 54 x 70mm.",
Expand Down
4 changes: 2 additions & 2 deletions src/print/utils/file-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* @returns {string}
*/
export default (arrLength, firstPrintData) => {
const productNameForFile = fileNameSafe(firstPrintData.productName);
const productNameForFile = fileNameSafe(firstPrintData.productCode);

const isMultiPage = arrLength > 1;
if (isMultiPage) {
return `${productNameForFile}+${fileNameSafe(firstPrintData.productCode)}`;
return productNameForFile;
}

const productColourForFile = fileNameSafe(firstPrintData.productColour);
Expand Down

0 comments on commit 111011f

Please sign in to comment.