From f5045ffe80fc355ce2f9dbe0482d053cda904270 Mon Sep 17 00:00:00 2001 From: acardinale Date: Sun, 10 Nov 2013 16:46:23 +0100 Subject: [PATCH 1/2] Fix parseIdentify parseIdentify causes split error in "geometry = result['geometry'].split(/x/)" because it not parse correctly --- imagemagick.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imagemagick.js b/imagemagick.js index b846c0c..a3d1d6c 100644 --- a/imagemagick.js +++ b/imagemagick.js @@ -121,7 +121,8 @@ function parseIdentify(input) { } if (comps.length < 2) { props.push(prop); - prop = prop[currentLine.split(':')[0].trim().toLowerCase()] = {}; + if(currentLine.indexOf(':')>=0) + prop = prop[currentLine.split(':')[0].trim().toLowerCase()] = {}; } else { prop[comps[0].trim().toLowerCase()] = comps[1].trim() } From 3aa795d4c07d136f1fd4dd6f7b76824639bcdbc7 Mon Sep 17 00:00:00 2001 From: acardinale Date: Wed, 19 Feb 2014 20:06:01 +0100 Subject: [PATCH 2/2] Update imagemagick.js --- imagemagick.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagemagick.js b/imagemagick.js index a3d1d6c..4fe620a 100644 --- a/imagemagick.js +++ b/imagemagick.js @@ -122,7 +122,7 @@ function parseIdentify(input) { if (comps.length < 2) { props.push(prop); if(currentLine.indexOf(':')>=0) - prop = prop[currentLine.split(':')[0].trim().toLowerCase()] = {}; + prop[currentLine.split(':')[0].trim().toLowerCase()] = {}; } else { prop[comps[0].trim().toLowerCase()] = comps[1].trim() }