Skip to content

Commit 0b51903

Browse files
committed
Tiny improvement over #278
1 parent afe80e3 commit 0b51903

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

jspdf.plugin.from_html.js

+2-8
Original file line numberDiff line numberDiff line change
@@ -851,13 +851,7 @@
851851
settings = {};
852852
if (!settings.elementHandlers)
853853
settings.elementHandlers = {};
854-
855-
if (x === undefined)
856-
x = 4;
857-
858-
if (y === undefined)
859-
y = 4;
860-
861-
return process(this, HTML, x, y, settings, callback);
854+
855+
return process(this, HTML, isNaN(x) ? 4 : x, isNaN(y) ? 4 : y, settings, callback);
862856
};
863857
})(jsPDF.API);

0 commit comments

Comments
 (0)