fix: preferCSSPageSize error type (#38761)

fix: preferCSSPageSize error type
This commit is contained in:
Shelley Vohr
2023-06-14 16:49:00 +02:00
committed by GitHub
parent dc2e822dc7
commit 10852b3fd5

View File

@@ -317,7 +317,7 @@ WebContents.prototype.printToPDF = async function (options) {
if (options.preferCSSPageSize !== undefined) {
if (typeof options.preferCSSPageSize !== 'boolean') {
return Promise.reject(new Error('footerTemplate must be a String'));
return Promise.reject(new Error('preferCSSPageSize must be a Boolean'));
}
printSettings.preferCSSPageSize = options.preferCSSPageSize;
}