summaryrefslogtreecommitdiff
path: root/src/static/js/AttributeManager.js
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2014-12-30 17:45:26 +0100
committerMarcel Klehr <mklehr@gmx.net>2014-12-30 17:45:26 +0100
commitcfe75c7f3f951ebae00255dd3799944c0a92ce68 (patch)
treea10960e68972c8ad8bb214beb34438ef0163ebf5 /src/static/js/AttributeManager.js
parentc20a7e9bce8b0dc1e73987304a7b2fc2d5a7a0c2 (diff)
downloadetherpad-lite-cfe75c7f3f951ebae00255dd3799944c0a92ce68.zip
Clean-up after removing list attribute: Remove list numbering attribute
Diffstat (limited to 'src/static/js/AttributeManager.js')
-rw-r--r--src/static/js/AttributeManager.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/static/js/AttributeManager.js b/src/static/js/AttributeManager.js
index 1da1056a..a11f6cef 100644
--- a/src/static/js/AttributeManager.js
+++ b/src/static/js/AttributeManager.js
@@ -169,11 +169,11 @@ AttributeManager.prototype = _(AttributeManager.prototype).extend({
if(attrib[0] === attributeName) return [attributeName, null]
return attrib
})
-
+
if(hasMarker){
ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 0]));
// If length == 4, there's [author, lmkr, insertorder, + the attrib being removed] thus we can remove the marker entirely
- if(attribs.length == 4) ChangesetUtils.buildRemoveRange(this.rep, builder, loc, (loc = [lineNum, 1]))
+ if(attribs.length <= 4) ChangesetUtils.buildRemoveRange(this.rep, builder, loc, (loc = [lineNum, 1]))
else ChangesetUtils.buildKeepRange(this.rep, builder, loc, (loc = [lineNum, 1]), attribs, this.rep.apool);
}