summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-07-01 08:26:18 +0100
committerwout <wout@impinc.co.uk>2013-07-01 08:26:18 +0100
commitb9b4af505a8f6abae7167bdff39d88c484d51aa7 (patch)
tree72a428f613b7046c32c92b0a82fc5449adfd4b1c /src
parent578c2bd6dffed8a636e64dbfbfedd3eb53539665 (diff)
downloadsvg.js-b9b4af505a8f6abae7167bdff39d88c484d51aa7.tar.gz
svg.js-b9b4af505a8f6abae7167bdff39d88c484d51aa7.zip
Fix in SVG.Number for IE0.24
Diffstat (limited to 'src')
-rw-r--r--src/number.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/number.js b/src/number.js
index 8cbf93a..8ca1422 100644
--- a/src/number.js
+++ b/src/number.js
@@ -13,16 +13,18 @@ SVG.Number = function(value) {
case 'string':
var match = value.match(SVG.regex.unit)
- /* make value numeric */
- this.value = parseFloat(match[1])
-
- /* normalize percent value */
- if (match[2] == '%')
- this.value /= 100
-
- /* store unit */
- this.unit = match[2]
-
+ if (match) {
+ /* make value numeric */
+ this.value = parseFloat(match[1])
+
+ /* normalize percent value */
+ if (match[2] == '%')
+ this.value /= 100
+
+ /* store unit */
+ this.unit = match[2]
+ }
+
break
default:
if (value instanceof SVG.Number) {