mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix crash for browsers that don't support placeholder attribute
This commit is contained in:
parent
3032dc6ce0
commit
2f3f27b672
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user