From 0f0c764d64e2e8a62c72821b9986240da311ce17 Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Fri, 3 Dec 2021 19:33:28 +0100 Subject: [PATCH] Filter out unknown paper sizes --- qml/pages/utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qml/pages/utils.js b/qml/pages/utils.js index 2805211..dbc74e0 100644 --- a/qml/pages/utils.js +++ b/qml/pages/utils.js @@ -396,9 +396,9 @@ function unitsIsDpi(resolution) return resolution.units == 3; } -function notCustomPaperSize(media) +function knownPaperSize(mediaName) { - return media.indexOf("custom_") != 0; + return media.hasOwnProperty(mediaName); } @@ -451,7 +451,7 @@ function fixupChoices(name, choices, mimeType) return choices; } case "media": - return choices.filter(notCustomPaperSize); + return choices.filter(knownPaperSize); default: return choices; }