Fix crash for browsers that don't support placeholder attribute

This commit is contained in:
Niklas von Hertzen 2013-01-11 19:34:56 +02:00
parent 3032dc6ce0
commit 2f3f27b672

View File

@ -822,7 +822,7 @@ _html2canvas.Parse = function (images, options) {
for(var imageIndex = backgroundImages.length; imageIndex-- > 0;) {
backgroundImage = backgroundImages[imageIndex];
if (!backgroundImage.args || backgroundImage.args.length === 0) {
continue;
}
@ -940,12 +940,12 @@ _html2canvas.Parse = function (images, options) {
}
break;
case "TEXTAREA":
if ((element.value || element.placeholder).length > 0){
if ((element.value || element.placeholder || "").length > 0){
renderFormValue(element, bounds, stack);
}
break;
case "SELECT":
if ((element.options||element.placeholder).length > 0){
if ((element.options||element.placeholder || "").length > 0){
renderFormValue(element, bounds, stack);
}
break;