Fixed custom renderer option

This commit is contained in:
Bdkzero 2012-04-23 23:04:23 +02:00
parent de1d1d7087
commit a5969be6f6

View File

@ -43,7 +43,7 @@ html2canvas = function( elements, opts ) {
if (typeof options.renderer === "string" && _html2canvas.Renderer[options.renderer] !== undefined) { if (typeof options.renderer === "string" && _html2canvas.Renderer[options.renderer] !== undefined) {
options._renderer = _html2canvas.Renderer[options.renderer]( options ); options._renderer = _html2canvas.Renderer[options.renderer]( options );
} else if (typeof options.renderer === "function") { } else if (typeof options.renderer === "function") {
options._renderer = _html2canvas.Renderer.Canvas( options ); options._renderer = options.renderer( options );
} else { } else {
throw("Unknown renderer"); throw("Unknown renderer");
} }