summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2013-10-10 16:38:16 +0200
committerMarcel Klehr <mklehr@gmx.net>2013-10-10 16:38:16 +0200
commitccf4683558928925ec2f637be05916e8f1a2e91e (patch)
tree189a5bd56bd1d83e3210b4872c49e88364a6c5e0
parentd86d99bc16a8c0027483f23c07e2b3063604c727 (diff)
downloadetherpad-lite-ccf4683558928925ec2f637be05916e8f1a2e91e.zip
Easysync: Throw an error if an unknown attrib is referneced
-rw-r--r--src/static/js/Changeset.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js
index f9270385..5841dadd 100644
--- a/src/static/js/Changeset.js
+++ b/src/static/js/Changeset.js
@@ -1504,6 +1504,7 @@ exports.moveOpsToNewPool = function (cs, oldPool, newPool) {
return upToDollar.replace(/\*([0-9a-z]+)/g, function (_, a) {
var oldNum = exports.parseNum(a);
var pair = oldPool.getAttrib(oldNum);
+ if(!pair) exports.error('Can\'t copy unknown attrib (reference attrib string to non-existant pool entry). Inconsistent attrib state!');
var newNum = newPool.putAttrib(pair);
return '*' + exports.numToString(newNum);
}) + fromDollar;