plugins/raphael.export.js
[raphael] / plugins / raphael.export.js
index 0f23a43..24e14cc 100644 (file)
                                                },
                                                {
                                 style: 'text-anchor: ' + (style.font.anchor ? (style.font.anchor  +';' ): 'middle;') + 
-                                    styleToString(style) + ';' }
-                                               ),
+                                    styleToString(style) + ';'
+                        }
+                                       ),
                                        node.matrix,
                                        tag('tspan',
                             {
                                reduce(
                                        node.attrs,
                                        function(initial, value, name) {
-                                               if ( name === 'path' ) name = 'd';
+                                               if ( name === 'path' ) {
+                            name = 'd';
+                        }
 
-                                               initial[name] = value.toString();
+                                               initial[name] = (typeof(value) == 'undefined') ? '' : value.toString();
 
                                                return initial;
                                        },