mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Fix breaking getLength() call
Change-Id: Iaa6cb22bf93a677aff077ce38ee11e606430cee5
This commit is contained in:
parent
db644e915f
commit
9d99cdbb67
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue