Temporary fix for insert method in TransactionProcessor

This commit is contained in:
Inez Korczynski 2011-12-10 02:19:21 +00:00
parent 37d3b7ceac
commit 224fc98449

View file

@ -259,7 +259,8 @@ es.TransactionProcessor.prototype.insert = function( op ) {
var node,
index,
offset;
if ( es.DocumentModel.isStructuralOffset( this.model.data, this.cursor ) ) {
if ( es.DocumentModel.isStructuralOffset( this.model.data, this.cursor ) && this.cursor != this.model.data.length ) {
// FIXME: This fails when inserting something like </list><list> between 2 list items
// @see test #30 in es.TransactionProcessor.test.js
es.insertIntoArray( this.model.data, this.cursor, op.data );