Skip to content

Commit 57d6fb2

Browse files
Ran npm run prettier to reformat code. (#3141)
Co-authored-by: Lukas Holländer <[email protected]>
1 parent 99cbee4 commit 57d6fb2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/jspdf.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3228,7 +3228,11 @@ function jsPDF(options) {
32283228
scaleFactor = 6;
32293229
break;
32303230
default:
3231-
throw new Error("Invalid unit: " + unit);
3231+
if (typeof unit === "number") {
3232+
scaleFactor = unit;
3233+
} else {
3234+
throw new Error("Invalid unit: " + unit);
3235+
}
32323236
}
32333237

32343238
var encryption = null;

0 commit comments

Comments
 (0)