File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff 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 ;
Original file line number Diff line number Diff line change @@ -844,7 +844,8 @@ declare module "jspdf" {
844844 ry : number ,
845845 style ?: string | null
846846 ) : jsPDF ;
847- save ( filename ?: string , options ?: { returnPromise ?: boolean } ) : jsPDF ;
847+ save ( filename : string , options : { returnPromise : true } ) : Promise < void > ;
848+ save ( filename ?: string ) : jsPDF ;
848849 saveGraphicsState ( ) : jsPDF ;
849850 setCharSpace ( charSpace : number ) : jsPDF ;
850851 setCreationDate ( date ?: Date | string ) : jsPDF ;
You can’t perform that action at this time.
0 commit comments