From 26a81da2f0d9c52cb50cd0e33680aec517598477 Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Tue, 6 Aug 2013 18:20:20 +0300 Subject: [PATCH] Ignore transforms if non found --- src/Parse.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Parse.js b/src/Parse.js index 5aa20a7..5ee38e4 100644 --- a/src/Parse.js +++ b/src/Parse.js @@ -955,10 +955,12 @@ _html2canvas.Parse = function (images, options) { var TRANSFORM_REGEXP = /(matrix)\((.+)\)/; if (transform && transform !== "none") { var match = transform.match(TRANSFORM_REGEXP); - switch(match[1]) { - case "matrix": - matrix = match[2].split(",").map(Util.trimText).map(Util.asFloat); - break; + if (match) { + switch(match[1]) { + case "matrix": + matrix = match[2].split(",").map(Util.trimText).map(Util.asFloat); + break; + } } }