diff --git a/plugins/_transforms.js b/plugins/_transforms.js
index 47c299fb..0b2acc77 100644
--- a/plugins/_transforms.js
+++ b/plugins/_transforms.js
@@ -42,8 +42,8 @@ exports.transform2js = function(transformString) {
}
});
- return transforms;
-
+ // return empty array if broken transform (no data)
+ return current && current.data ? transforms : [];
};
/**
@@ -65,9 +65,7 @@ exports.transformsMultiply = function(transforms) {
// multiply all matrices into one
transforms = {
name: 'matrix',
- data: transforms.reduce(function(a, b) {
- return multiplyTransformMatrices(a, b);
- })
+ data: transforms.length > 0 ? transforms.reduce(multiplyTransformMatrices) : []
};
return transforms;
diff --git a/test/plugins/convertTransform.04.svg b/test/plugins/convertTransform.04.svg
index 5dcfe219..8ed0af18 100644
--- a/test/plugins/convertTransform.04.svg
+++ b/test/plugins/convertTransform.04.svg
@@ -10,6 +10,7 @@
+
@@@
@@ -26,4 +27,5 @@
+