diff --git a/src/shapes/itext.class.js b/src/shapes/itext.class.js index f1deb529..e2b36478 100644 --- a/src/shapes/itext.class.js +++ b/src/shapes/itext.class.js @@ -1121,16 +1121,16 @@ * @return {Object} object representation of an instance */ toObject: function(propertiesToInclude) { - var newStyle = { }, i, j, row; + var clonedStyles = { }, i, j, row; for (i in this.styles) { row = this.styles[i]; - newStyle[i] = { }; + clonedStyles[i] = { }; for (j in row) { - newStyle[i][j] = clone(row[j]); + clonedStyles[i][j] = clone(row[j]); } } return fabric.util.object.extend(this.callSuper('toObject', propertiesToInclude), { - styles: newStyle + styles: clonedStyles }); } });