Avoid exception when using SVG Tiny 1.2 definitions file.
--- a/publish/definitions.js Sat Apr 06 16:36:59 2013 +1100
+++ b/publish/definitions.js Sat Apr 06 16:37:10 2013 +1100
@@ -433,9 +433,11 @@
for (var i = 0; i < element.attributeCategories.length; i++) {
var catName = element.attributeCategories[i];
var cat = defs.attributeCategories[catName];
- for (var j = 0; j < cat.attributes.length; j++) {
- element.attributes[cat.attributes[j].name] = cat.attributes[j];
- element.attributeOrder.push(cat.attributes[j].name);
+ if (cat) {
+ for (var j = 0; j < cat.attributes.length; j++) {
+ element.attributes[cat.attributes[j].name] = cat.attributes[j];
+ element.attributeOrder.push(cat.attributes[j].name);
+ }
}
}
for (var i = 0; i < defs.commonAttributesForElements.length; i++) {