summaryrefslogtreecommitdiff
path: root/src/static/js/AttributeManager.js
diff options
context:
space:
mode:
authorLuiza Pagliari <lpagliari@gmail.com>2016-03-15 15:44:00 -0300
committerLuiza Pagliari <lpagliari@gmail.com>2016-03-15 15:44:00 -0300
commit9bcf8690c063bd572afff9d70d9fc0d64a0318db (patch)
tree2f701f9228282e127cbf051203c003928536141f /src/static/js/AttributeManager.js
parenta3188cf3574234f17f927499c2f739c2bd5fd9d3 (diff)
downloadetherpad-lite-9bcf8690c063bd572afff9d70d9fc0d64a0318db.zip
Update author when removing line attribute from line
This avoids raising error 'Trying to submit changes as another author in changeset' when 2 authors change line attributes of the same line. This fixes issue #2925.
Diffstat (limited to 'src/static/js/AttributeManager.js')
-rw-r--r--src/static/js/AttributeManager.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/static/js/AttributeManager.js b/src/static/js/AttributeManager.js
index d4d20a1f..e3749510 100644
--- a/src/static/js/AttributeManager.js
+++ b/src/static/js/AttributeManager.js
@@ -278,6 +278,9 @@ AttributeManager.prototype = _(AttributeManager.prototype).extend({
if (attrib[0] === attributeName && (!attributeValue || attrib[0] === attributeValue)){
found = true;
return [attributeName, ''];
+ }else if (attrib[0] === 'author'){
+ // update last author to make changes to line attributes on this line
+ return [attributeName, this.author];
}
return attrib;
});