wlxml: metadata - ignore setting the same value as the old one
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 21 Jan 2014 11:13:58 +0000 (12:13 +0100)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Tue, 21 Jan 2014 11:36:17 +0000 (12:36 +0100)
src/wlxml/extensions/metadata/metadata.js

index acd404c..899306d 100644 (file)
@@ -17,6 +17,9 @@ _.extend(Row.prototype, {
     ChangeProperty: smartxmlTransformations.createContextTransformation({
         impl: function(t, rowIndex, propName, value) {
             var row = this.getMetadata().at(rowIndex);
+            if(row.getValue() === value) {
+                return;
+            }
             t.rowIndex = rowIndex;
             t.propName = propName;
             t.oldValue = row[propName];