From 2f3f27b6722948f84edd27e827f6421ae6305ce2 Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Fri, 11 Jan 2013 19:34:56 +0200 Subject: [PATCH] Fix crash for browsers that don't support placeholder attribute --- src/Parse.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Parse.js b/src/Parse.js index ee3c60b..e20c37c 100644 --- a/src/Parse.js +++ b/src/Parse.js @@ -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;