Fix breaking getLength() call

Change-Id: Iaa6cb22bf93a677aff077ce38ee11e606430cee5
This commit is contained in:
Catrope 2013-05-10 17:02:07 -07:00
parent db644e915f
commit 9d99cdbb67

View file

@ -260,7 +260,7 @@ ve.dm.MetaList.prototype.insertMeta = function ( meta, offset, index ) {
meta = meta.getElement();
}
if ( offset === undefined ) {
offset = this.document.getLength();
offset = this.document.data.getLength();
index = 0;
} else if ( index === undefined ) {
index = ( this.document.metadata.getData( offset ) || [] ).length;